java/j2ee tips and blueprints
java/j2ee tips and blueprints
It is a very sad thing that nowadays
there is so little useless information.
Oscar Wilde
Clustering Acegi via JGroups (DistributedHashtable)
in my previous blog I suggest to use jms or caching for a distributable SessionRegistry
but I found a more simple solution JGroups -
DistributedHashtable :JGroups gives us such a perfect simple class to distributed maps.
- All read-only operations runs on local copies
- perfect merge strategies.
- easy implementation and configuration
- vs..
I implement two classes
first DistributableSessionInformation in fact nothing different from original SessionInformation there are points
- implements Serializable
- default constructor for SessionInformation is private and it is required for serialization
- hashcode and equals methods
- it it immutable no more refreshLastRequest method
DistributableSessionRegistryImpl is SessionRegistry via JGroups
you can set both jgroups file and cluster name
if you use init and destroy method it will be cluster enabled else local singleton cache
sample configuration
<bean id=”org.acegisecurity.concurrent.SessionRegistry”
class=”tr.com.oasis.babylon.acegi.DistributableSessionRegistryImpl” init-method=”init” destroy-method=”destroy”>
<property name=”channelName” value=”acegicluster1″/>
<property name=”clusterOptions” value=”udp.xml”/>
<property name=”distributable” value=”${distributable}”/>
</bean>
download distributable-acegi.zip for both source and binary
dependency :
- acegi 1.0.3+
- jgroups 2.4.1
- log4j 1.2.13
http://www.jgroups.org
http://www.acegisecurity.org/
waiting for your comments
Update:
06.18.2007:small update for upload link and implementation for a small bug.
Hot Referers:
http://www.theserverside.com/blogs/thread.tss?thread_id=45789
www.dzone.com/links/distributable_acegi_via_jgroups.html
http://forum.springframework.org/showthread.php?t=40111
forum.springframework.org/showthread.php?p=126459












Thanks for information.
many interesting things
Celpjefscylc