Sunday, March 12, 2006

Setting default connection pool idle timeout for mysql

in mysql-ds.xml

Add the following to your datasource:

<idle-timeout-minutes>10</idle-timeout-minutes>

In this example we have decreased the timeout from 15 minutes to 10 minutes (jboss default is 15 minutes)

The method by which i have understood that thats whats needs to be done is by looking at: hsqldb-ds.xml

Tuesday, March 07, 2006

JBoss connection pool and fail over database

JBoss uses a connection pool to connect to databases. If you however have your database behind a fail over machine then note that the fail over machine that provides you with the link to the real database might have a timeout on the connection, in my case the fail over machine - the alteon had a timeout of 10 minutes while jboss had a timeout of 15 minutes for its connections this means that some of the connections got disconnected by the alteon, the solution to that problem was to decrease the timeout of the connections in jboss connection pool to be smaller than the timeout of the connection pool of the alteon

Monday, March 06, 2006

Cache invalidation in cluster

If you want your EJB's to invlidate their cache cross cluster you must add the following to each entity bean:

<cache-invalidation>True</cache-invalidation>
click here for more details