Skip to content

Commit 2a6c3d0

Browse files
Clarify UCN object refresh [v/5.5] (#1581)
Backport of #1574 Classes' bytecode will be refreshed, but old instances will use old bytecode. Co-authored-by: Tomasz Gawęda <tomasz.gaweda@outlook.com>
1 parent 1e34064 commit 2a6c3d0

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/modules/clusters/pages/ucn-dynamic-client.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ You must create a _Client.java_ file containing the required code and save it to
6161

6262
NOTE: Ensure that you have configured your data structure (an `IMap` in this example) on the member side with the same {ucn} referenced in your client configuration.
6363

64+
include::partial$ucn-obj-refresh-caution.adoc[]
65+
6466
The file will be similar to the following:
6567

6668
[source,java]

docs/modules/clusters/pages/ucn-dynamic-config.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ For example, you can use the dynamic configuration API to add or replace a speci
99

1010
NOTE: Before you can use {ucn}, you must enable it as described in the xref:clusters:ucn-enable.adoc[] topic.
1111

12+
include::partial$ucn-obj-refresh-caution.adoc[]
13+
1214
You must create a _Client.java_ file containing the required code and save it to your class configuration folder.
1315
The file will be similar to the following:
1416
[source,java]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CAUTION: {ucn} can replace resources dynamically, but this does not affect the lifecycle of existing instances using older class versions.
2+
This means that the creation of new objects will use new resources (latest bytecode), but existing objects won't be removed and recreated automatically. In this case, manual intervention is needed, such as destroying and recreating the relevant objects, or restarting Hazelcast members.
3+
This is particularly applicable to long-lived objects tied to the lifecycle of Hazelcast data structures, such as a `MapLoader`: deploying a new version won't replace an existing `MapLoader`, and to refresh such an object, a cluster restart is required.

0 commit comments

Comments
 (0)