Hello,

I am currently trying to set up session replication, and reading this
document [1], but a few questions remain.

In my setup are 4 apaches with mod_proxy which connect to 4 tomcats.
In front of the apaches is a hardware balancer
which does round-robin, but with a kind of sticky TCP-sessions, so
mostly the clients on the web stay on the same server. Mostly...

To be completely safe and sleep well, I would like to replicate the
sessions now,
and in the mentioned document I read that it is possible using the
PersistenceManager with JDBCStore.

My question now:
Is it enough to set up PersistenceManager with JDBCStore on my 4
tomcats to use the same database/table as session store ?
Or do I need to mess with ReplicationValve and jvmRoute set up as well ?

I will put my server.xml at the end of the file, which is set up with
JDBCStore using a Firebird Database with JayBird.

Best regards,
Yves


[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html



Server.xml which I use for testing:

<Server port="8005" shutdown="SHUTDOWN">

<Service name="Testing">
<Connector port="8181" />

<Engine name="testing" defaultHost="localhost">

<Host name="localhost" debug="99" appBase="/storage/tomcat"
unpackWARs="true" autoDeploy="true">

<Context path="/HelloWorld" docBase="HelloWorld" debug="99"
reloadable="false" distributable="true">

<Manager className="org.apache.catalina.session.PersistentManager"
debug="99" distributable="true"
maxActiveSessions="-1"
maxIdleBackup="10"
maxIdleSwap="15"
minIdleSwap="5"
maxInactiveInterval="1800"
saveOnRestart="true">

<Store className="org.apache.catalina.session.JDBCStore"
driverName="org.firebirdsql.jdbc.FBDriver"
connectionURL="jdbc:firebirdsql:myhighavailablefirebirdserver:tomcat_sessions?userName=SYSDBA&amp;password=masterkey&amp;encoding=UTF8"
sessionTable="session"
sessionAppCol="app_name"
sessionDataCol="session_data"
sessionIdCol="session_id"
sessionLastAccessedCol="last_access"
sessionMaxInactiveCol="max_inactive"
sessionValidCol="valid_session"
debug="99" checkInterval="60" />

</Manager>

</Context>

</Host>

</Engine>
</Service>

</Server>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to