Hi All,
I really hope somebody can give me an hint on this matter, because it is driving me 
crazy :-(

I have to implement a simple distributed cache between multiple JBoss  istances not 
necessarily clustered.
I though to use JGroups 2.2, which I understand JBoss uses already for clustering. 
Therefore, I created a DistributedHashtable in the init() of my servlet as follows:

JChannel c = new  JChannel(config.getInitParameter(PARAM_CHANNEL_PROPERTIES));
            
c.connect("thegroup");
cache = new DistributedHashtable(c, DEFAULT_TIMEOUT);

The channel is configured in this way:
"UDP(mcast_addr=228.1.2.3;mcast_port=45566;;ip_ttl=64;bind_addr=127.0.0.1;" +
                "ip_mcast=true;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" 
+
                "PING(timeout=2000;num_initial_members=3):" +
                "MERGE2(min_interval=5000;max_interval=10000):" +
                "FD_SOCK:" +
                "VERIFY_SUSPECT(timeout=1500):" +
                "pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):" +
                "UNICAST(timeout=5000):" +
                "pbcast.STABLE(desired_avg_gossip=20000):" +
                "FRAG(frag_size=4096;down_thread=false;up_thread=false):" +
                "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +
                "shun=false;print_local_addr=true):" +
                "pbcast.STATE_TRANSFER";

Then when I run the servlet I put something in the hashtable. It alone works well.

Then I would like to test it with aother VM. I developed a simple program  that 
creates its own DistributedHastable on a chennel connected to the same group as the 
other one (see the code at the bottom).

In short, I have the following strange situation:

1) both JVMs see each other (I display the channel views)
2) changes made with the second JVMs are propagated to the JBoss DistributedHahtable
3) changes made in the JBoss VM are NOT propagated to the second VM!!!!

I can't really understand why, as I though multicast communications have no a specific 
direction....

Any help is very appreciated.

Stefano
-------------------------------------------------------------

2nd VM code:
=========

String 
props="UDP(mcast_addr=228.1.2.3;mcast_port=45566;;ip_ttl=64;bind_addr=127.0.0.1;" +
                "ip_mcast=true;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" 
+
                "PING(timeout=2000;num_initial_members=3):" +
                "MERGE2(min_interval=5000;max_interval=10000):" +
                "FD_SOCK:" +
                "VERIFY_SUSPECT(timeout=1500):" +
                "pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):" +
                "UNICAST(timeout=5000):" +
                "pbcast.STABLE(desired_avg_gossip=20000):" +
                "FRAG(frag_size=4096;down_thread=false;up_thread=false):" +
                "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +
                "shun=false;print_local_addr=true):" +
                "pbcast.STATE_TRANSFER";
JChannel c = new JChannel(props);

c.connect("thegroup");
DistributedHashtable h = new DistributedHashtable(c, -1);


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823386#3823386

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823386


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to