![]() |
![]() |
![]() |
Personal Project | ShareYourDrive | Tomcat | Tomcat Cluster | Useful Scripts | Rhythmbox | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Google Summer of Code 2006 on Apache Tomcat |
![]() |
![]() |
I would have liked to participate to the Google Summer of Code 2006 on Apache Tomcat, but I wasn't selected. Anyway I developped two functionalities for the Tomcat server.
You have to download the ClusterSingleSignOn patch for Tomcat 5.5 or ClusterSingleSignOn patch for Tomcat 6.0 and the JMS Cluster patch for Tomcat 5.5 and the jms library from geronimo. Then to install the patchs you have to apply it on a last svn snapshot from Tomcat and save the jms library in /usr/share/java. Afterwards you have to compile Tomcat like always with ant.
To configure the ClusterSingleSingOn in the file server.xml, you have to declare a Valve in the cluster Host like this :
To configure the JMS Cluster in the file server.xml, you have to declare a Cluster in the Host like this :
If you want to do a benchmark, you can use tsung and adapt this test file.
The new directory authenticator in org.apache.catalina.cluster
ClusterSingleSignOn.java | It is a SingleSignOn extension. It start the ClusterSingleSignOnListener and has some functions to call the SingleSignOn functions from the cluster environment. |
ClusterSingleSignOnListener.java | It is a ClusterListener extension. It received the SingleSignOnMessage and call ClusterSingleSignOn on the right function. |
mbeans-descriptors.xml | The descriptor for the JMX functionality. I don't know if I have to create a function to register the MBeans on the MBeans server or if the register function in SingleSignOn is enough. I have a doubt too on if I have to add in this file the SingleSingOn functions or not. |
SingleSignOnMessage.java | It implements ClusterMessage to send between the nodes all the informations on the SSO such as the action, the SSO id, the Session id... |
There is a small modification in the SingleSignOn class because sometimes principal can be null. Just a small verification...
The new directory jms in org.apache.catalina.cluster
ClusterJmsException.java | An Exception which happened when there is a problem with the connection to the MOM |
Constants.java | Name of the package |
mbeans-descriptors.xml | The descriptor for the JMX functionality. |
MjmsMember.java | A membership implementation using simple jms. This is the representation of a jms member. |
MjmsMessage.java | Contains the Member data, read and written by the MjmsService |
MjmsService.java | A membership implementation using simple jms. This is the representation of a jms membership service. This class is responsible for maintaining a list of active cluster nodes in the cluster. If a node fails to send out a heartbeat, the node will be dismissed. |
ReplicationListener.java | Implement the jms onMessage function. Receive the jms BytesMessage and convert them to ClusterMessage. |
ReplicationTransmitter.java | Use the topicPublisher to send message to the MOM. Convert the message from ClusterMessage to jms BytesMessage. |
SimpleJmsCluster.java | The cluster Valve. It uses the configuration to initialize the whole cluster. |
In McastMembership I replaced all the references to McastMember by Member. In ReplicationTransmitter, MembershipService and McastService, I replaced the reference to SimpleTcpCluster by a reference to CatalinaCluster. In Member, I added the setMemberAliveTime method.
This is an howto which explain how to use Tomcat JMS Cluster.
© Fabien Carrion, 2006 - 2008.