GlassFish 3.1 and Manual Synchronization
By Jennifer Chou on Feb 28, 2011
If you need to setup a GlassFish cluster on machines which are unable to talk to each other, you can do so with the new manual synchronization commands introduced in GlassFish 3.1: export-sync-bundle and import-sync-bundle
Machine A = DAS
Machine B = remote machine
You have an existing cluster cluster1 with instance1 which you want to synchronize on to machine B.
instance1 has already been registered in DAS domain.xml on machine A using create-local-instance.
1. Export cluster1 on machine A
asadmin export-sync-bundle cluster1
This will create the sync bundle which contains the cluster configuration:
2. Copy cluster1-sync-bundle.zip to machine B.
If machine B can talk to machine A, you can use the --retrieve option.
On machine B do
asadmin --host machineA export-sync-bundle --target cluster1 --retrieve=true
This will download the sync bundle from machine A onto machine B.
3. On machine B import the sync bundle
asadmin import-sync-bundle --instance instance1 cluster1-sync-bundle.zip
The instance1 filesystem is created using the sync bundle under the node that is provided in the domain.xml. You can specify a different node by using the --node option.
instance1 must already have been registered on DAS domain.xml on machine A, using create-local-instance or create-instance. If it is not registered, import-sync-bundle will give an error.