I downloaded and installed jboss-4.0.3SP1. I installed, on the first node, Apache with the mod_jk module, configurating it with my two nodes addresses in the conf/worker.properties file (I called my nodes "node1" and "node2"). I also configured Jboss with this instructions: http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html#clustering-http-jboss I've started Apache and then Jboss on node1. It says:
... 16:38:19,828 INFO [TreeCache] setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=8;loopback=false;mcast_addr=230.1.2.7;mcast_port=45577;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) 16:38:20,093 INFO [TreeCache] interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor 16:38:20,093 INFO [TreeCache] cache mode is REPL_ASYNC ... 16:38:22,250 INFO [TreeCache] viewAccepted(): new members: [37.255.132.19:2097] 16:38:22,265 INFO [TreeCache] state could not be retrieved (must be first member in group) 16:38:22,265 INFO [TreeCache] new cache is null (maybe first member in cluster) ... Then I deployed on node1 my application, and Jboss says: 16:39:31,562 INFO [EARDeployer] Init J2EE application: file:/C:/Programmi/jboss-4.0.3SP1/server/all/deploy/AddressbookApp.ear 16:39:33,078 INFO [EjbModule] Deploying AddressBookEJB 16:39:34,031 INFO [EjbModule] Deploying GestioneAddressBookEJB 16:39:35,203 INFO [ProxyFactory] Bound EJB Home 'AddressBookEJB' to jndi 'AddressBookHome' 16:39:38,250 INFO [STDOUT] CLASSPATH component C:\Programmi\Sun\AppServer\jdk\jre\lib\ext\dnsns.jar: java.util.zip.ZipException: invalid CEN header (bad signature) 16:39:38,468 INFO [ProxyFactory] Bound EJB Home 'GestioneAddressBookEJB' to jndi 'GestioneAddressBookHome' 16:39:38,468 INFO [EJBDeployer] Deployed: file:/C:/Programmi/jboss-4.0.3SP1/server/all/tmp/deploy/tmp25345AddressbookApp.ear-contents/AddressbookEJB.jar 16:39:38,703 INFO [TomcatDeployer] deploy, ctxPath=/addressbook, warUrl=.../tmp/deploy/tmp25345AddressbookApp.ear-contents/AddressbookWeb-exp.war/ 16:39:39,703 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2 16:39:39,906 INFO [JBossCacheManager] Starting JBossManager 16:39:39,953 INFO [JBossCacheManager] We are using mod_jk(2) for load-balancing. Will add JvmRouteValve. 16:39:40,296 INFO [EARDeployer] Started J2EE application: file:/C:/Programmi/jboss-4.0.3SP1/server/all/deploy/AddressbookApp.ear Then I launched Jboss on node2: ... 17:20:37,656 INFO [TreeCache] setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=8;loopback=false;mcast_addr=230.1.2.7;mcast_port=45577;mcast_rec v_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_t hread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=fals e;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_si ze=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_t imeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) 17:20:37,812 INFO [TreeCache] interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor 17:20:37,812 INFO [TreeCache] cache mode is REPL_ASYNC ... 17:20:40,015 INFO [TreeCache] viewAccepted(): new members: [SIGIP4:2097, 37.255.132.18:1074] 17:20:40,093 INFO [TreeCache] received the state (size=192 bytes) 17:20:40,109 INFO [TreeCache] transient state: 140 bytes 17:20:40,109 INFO [TreeCache] setting transient state 17:20:40,140 INFO [TreeCache] locking the old tree 17:20:40,156 INFO [TreeCache] locking the old tree was successful 17:20:40,156 INFO [TreeCache] setting the transient state was successful 17:20:40,156 INFO [TreeCache] forcing release of all locks in old tree 17:20:40,156 INFO [TreeCache] state was retrieved successfully (in 141 milliseconds) ... ...and, on node1: 17:20:21,203 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 1, delta: 1) : [37.255.132.19:1099, 37.255.132.18:1099] 17:20:21,203 INFO [DefaultPartition] I am (37.255.132.19:1099) received membershipChanged event: 17:20:21,203 INFO [DefaultPartition] Dead members: 0 ([]) 17:20:21,203 INFO [DefaultPartition] New Members : 1 ([37.255.132.18:1099]) 17:20:21,203 INFO [DefaultPartition] All Members : 2 ([37.255.132.19:1099, 37.255.132.18:1099]) 17:20:41,203 INFO [TreeCache] viewAccepted(): new members: [37.255.132.19:2097, CAMP4:1074] 17:20:41,250 INFO [TreeCache] locking the tree to obtain transient state 17:20:41,265 INFO [TreeCache] returning the transient state (140 bytes) Then, I deployed my application (the complete .ear package with both servlet and ejbs, as on node1): 17:24:39,875 INFO [EARDeployer] Init J2EE application: file:/C:/Programmi/jboss-4.0.3SP1/server/all/deploy/AddressbookApp.ear 17:24:40,593 INFO [EjbModule] Deploying AddressBookEJB 17:24:40,890 INFO [EjbModule] Deploying GestioneAddressBookEJB 17:24:42,937 INFO [ProxyFactory] Bound EJB Home 'AddressBookEJB' to jndi 'AddressBookHome' 17:24:45,421 INFO [ProxyFactory] Bound EJB Home 'GestioneAddressBookEJB' to jndi 'GestioneAddressBookHome' 17:24:45,421 INFO [EJBDeployer] Deployed: file:/C:/Programmi/jboss-4.0.3SP1/server/all/tmp/deploy/tmp59685AddressbookApp.ear-contents/AddressbookEJB.jar 17:24:45,515 INFO [TomcatDeployer] deploy, ctxPath=/addressbook, warUrl=.../tmp /deploy/tmp59685AddressbookApp.ear-contents/AddressbookWeb-exp.war/ 17:24:45,718 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2 17:24:45,765 INFO [JBossCacheManager] Starting JBossManager 17:24:45,781 INFO [JBossCacheManager] We are using mod_jk(2) for load-balancing. Will add JvmRouteValve. 17:24:45,859 INFO [EARDeployer] Started J2EE application: file:/C:/Programmi/jboss-4.0.3SP1/server/all/deploy/AddressbookApp.ear The problem is: the session state isn't replicated. When I use my application (and store some data in the entity ejb) on node1, then it's not replicated on node2. In facts, using the application on node2, I have the same situation as the initial database state (modified data on node1 is not replicated on node2). I see a far light at the end of the tunnel... but I'm still inside! :( What's wrong??? Did I miss some passages? Thanks a lot. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914015#3914015 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914015 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
