8 Replies Latest reply on Feb 11, 2013 7:23 AM by Nilindra Fernando

    Multiple instances (via port bindings) for same name application leads to web session mess up.

    Nilindra Fernando Newbie

      Hi All,

       

      I am facing the following strange problem with Jboss 7.1.1 AS. (I am yet to check this with EAP 6 as well)

       

      I configured Jboss 7 with multiple instances as outline in Approach 2 of the following link.

       

      https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine

       

      To simiply the problem I took a sample struts application which was developed via http://www.dzone.com/tutorials/java/struts/struts-tutorial/struts-tutorial-using-eclipse-1.html

       

      For this I have added a OneHttpSessionListener class to observe the session creation / destroy behaviour.

       

      I deployed Test.war to both Jboss instances and I was able to access the node1 instance as follows.

       

      http://localhost:8080/Test/ --> Console results in ....(session) Created:ID=c69m+MgYMQ6GNSvvTtNEWLyT.undefined MaxInactiveInterval=1800....

       

      Then I access the node2 instance as follows.

       

      http://localhost:8180/Test/ --> Console results in ... (session) Created:ID=SREizIOmklhD6flEgnEXZzZH.undefined MaxInactiveInterval=1800

       

      Then once I refresh the node1  http://localhost:8080/Test/ it results in creating a new session as follows.

       

      (session) Created:ID=vQjfQY3FK7qDbjMYb+4jLQNz.undefined MaxInactiveInterval=1800

       

      As per my understanding this should utilize the old session with out creating a new session by itself. This is happening correctly if these two applications were deployed with two different context names. This issue leads to mess up the j_security_check in same applications which are hosted via multiple instances in the same machine.

       

      I have attached both the source as Test.zip and the war as Test.war

       

      I think this is a bug in Jboss 7.1.1 which creates problems for the same application deployed in multiple instances.  I would appreciate if any Jboss commiter could analyze this and raise a JIRA in order to get it fixed soon.

       

      Thanks

      Nilindra