4 Replies Latest reply on Jan 6, 2014 9:04 AM by Sanjeev Kumar

    Database persisted sessions for JBOSS 7.1

    Sanjeev Kumar Newbie



      I want to use database persisted session in JBOSS7.1 , but i am not getting any article on this.


      I have got an article in internet on this for server JBOSS4.0 which contain below steps.


      Step 1) We need to make the property "overrideDistributableManager" to false in stadalone.xml file in jboss7.1 server.

      <bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer"> 

         <!-- "False" disables overriding the session manager for distributable webapps --> 

      <property name="overrideDistributableManager">false</property> 




      Note: I am not able to find out this entry in standalone.xml



      step 2) We need to use context.xml in WEB-INF directory of the web application.The context.xml file will contain followin detail.

      <Context cookies="true" crossContext="true"> 

      <Manager className="org.jboss.web.tomcat.service.session.persistent.DataSourcePersistentManager" 




      step3)Create a table which has following columns.

      CREATE TABLE httpsessions (app VARCHAR(255) NOT NULL, id VARCHAR(255) NOT NULL,  

           fullId VARCHAR(255) NOT NULL, creationtime BIGINT NOT NULL,  

           maxinactive BIGINT NOT NULL, version INT NOT NULL, lastaccess BIGINT NOT NULL,  

           isnew CHAR(1) NOT NULL, valid CHAR(1) NOT NULL, metadata VARBINARY NULL,  

           attributes LONGVARBINARY NOT NULL,  

      CONSTRAINT app_id PRIMARY KEY (app, id))



      Can i use the same above steps for the JBOSS7.1 or we have different steps for configuring this in JBOSS7.1.

      Can anybody send me a link or steps where i can get info about this.



      Sanjeev Kumar