Developer
Jboss Clustering
rocksea
2012. 3. 19. 16:37
Jboss5.1 기준
목적 : jboss clustering 을 위한 instance 설정.
run.sh option :
-h, --help Show this help message
-V, --version Show version information
-- Stop processing options
-D<name>[=<value>] Set a system property
-d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url
-p, --patchdir=<dir> Set the patch directory; Must be absolute or url
-n, --netboot=<url> Boot from net with the given url as base
-c, --configuration=<name> Set the server configuration name
-B, --bootlib=<filename> Add an extra library to the front bootclasspath
-L, --library=<filename> Add an extra library to the loaders classpath
-C, --classpath=<url> Add an extra url to the loaders classpath
-P, --properties=<url> Load system properties from the given url
-b, --host=<host or ip> Bind address for all JBoss services
-g, --partition=<name> HA Partition name (default=DefaultDomain)
-m, --mcast_port=<ip> UDP multicast port; only used by JGroups
-u, --udp=<ip> UDP multicast address
-l, --log=<log4j|jdk> Specify the logger plugin type
1. Instance 생성
2. Instance 실행
3. Multicast Send & Receive Test
터미널을 두개띄워 하나는 Receive, 하나는 Send를 실행
Receiver
Sender
Sender에 메세지를 입력하면 Receiver에 보낸 메세지를 확인 할 수 있다.
목적 : jboss clustering 을 위한 instance 설정.
run.sh option :
-h, --help Show this help message
-V, --version Show version information
-- Stop processing options
-D<name>[=<value>] Set a system property
-d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url
-p, --patchdir=<dir> Set the patch directory; Must be absolute or url
-n, --netboot=<url> Boot from net with the given url as base
-c, --configuration=<name> Set the server configuration name
-B, --bootlib=<filename> Add an extra library to the front bootclasspath
-L, --library=<filename> Add an extra library to the loaders classpath
-C, --classpath=<url> Add an extra url to the loaders classpath
-P, --properties=<url> Load system properties from the given url
-b, --host=<host or ip> Bind address for all JBoss services
-g, --partition=<name> HA Partition name (default=DefaultDomain)
-m, --mcast_port=<ip> UDP multicast port; only used by JGroups
-u, --udp=<ip> UDP multicast address
-l, --log=<log4j|jdk> Specify the logger plugin type
1. Instance 생성
cp -r JBOSS_HOME/server/all JBOSS_HOME/server/node1
cp -r JBOSS_HOME/server/all JBOSS_HOME/server/node2
cp -r JBOSS_HOME/server/all JBOSS_HOME/server/node2
2. Instance 실행
JBOSS_HOME/bin/run.sh -c node1 -g DocsPartition -u 239.255.100.100 -b 0.0.0.0 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-02 &
JBOSS_HOME/bin/run.sh -c node2 -g DocsPartition -u 239.255.100.100 -b 0.0.0.0 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-03 &
JBOSS_HOME/bin/run.sh -c node2 -g DocsPartition -u 239.255.100.100 -b 0.0.0.0 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-03 &
3. Multicast Send & Receive Test
터미널을 두개띄워 하나는 Receive, 하나는 Send를 실행
Receiver
cd JBOSS_HOME/server/node1/lib
java -classpath jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 239.255.100.100
java -classpath jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 239.255.100.100
Sender
cd JBOSS_HOME/server/node2/lib
java -classpath jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr 239.255.100.100
java -classpath jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr 239.255.100.100
Sender에 메세지를 입력하면 Receiver에 보낸 메세지를 확인 할 수 있다.
by rocksea