[javagroups-users] Fwd: Setting Locking protocol
Brought to you by:
belaban
From: sujit k. <suj...@gm...> - 2011-05-10 16:05:43
|
Hi friends I am in process of migrating from jgroups-2.10.0.GA to jgroups-2.12.0.Final for using LockService. I searched all over on web to see an example for how to set a locking protocol as Bela Ban has mentioned as /home/bela/lock.xml in one of his blog. But unfortunately I could not find it. Currently my config is defined as #* **jgroups* locking* config* jgroups.locking.config=TCP(bind_addr=0.0.0.0;bind_port=21200;port_range=5):FILE_PING(location=/ *app*/log/*dev*/*jgroupslockingcontrol* ;num_initial_members=1;num_ping_requests=20):MERGE2(min_interval=500;max_interval=10000):FD_SOCK:FD(timeout=2000;max_tries=4):VERIFY_SUSPECT(timeout=1500):BARRIER:pbcast.NAKACK(use_mcast_xmit=false;gc_lag=0;retransmit_timeout=300,600,1200,2400,4800;discard_delivered_msgs=true):UNICAST(timeout=300,600,1200):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=400K):pbcast.GMS(print_local_addr=true;join_timeout=3000;view_bundling=true):FC(max_credits=2M;min_threshold=0.10):FRAG2(frag_size=32767):pbcast.STREAMING_STATE_TRANSFER When I tried just adding CENTRAL_LOCK(num_backups=1) in the avove defined property I get error as and I try to get Lock as following code Jchannel channel =* new* JChannel(getProperty("jgroups.locking.config")); LockService lockService =* new* LockService(channel); I hit following error java.lang.IllegalStateException: Channel configuration must include a locking protocol (subclass of org.jgroups.protocols.Locking) at org.jgroups.blocks.locking.LockService.setChannel(LockService.java:55) Can someone please help me on how shall I overcome this problem. Thanks Sujit |