The HeuristicRollbackException after a long period of inactivity
was caused by mysql timing out. The changes David Jenks
suggested solved the problem. Thanks David! Below are the
current settings from my jboss.jcml file for version 2.4.3.

Any further refinement suggestions welcome.

<mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
</mbean>

<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=DefaultDS">
<attribute name="PoolName">DefaultDS</attribute>
<attribute
name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attr
ibute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://localhost:3306/yourdatabase</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser">yourlogonid</attribute>
<attribute name="MaxSize">10</attribute>
<attribute name="Password">yourpassword</attribute>
<attribute name="GCEnabled">true</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">true</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">2</attribute>
</mbean>

> Do your db connections time out? If so, try setting up your pool with
> idletimeout true, gcenabled true, blocking true, and reasonable times. If
> you try this please let us know if it works
> david jencks

They do timeout with mysql. All these things were set to false, so
my jboss.jcml now contains the following. I wasn't sure what
"reasonable times" were, so let me know if these are not, then
I'll let you know if the problem goes away.

Thanks.

<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=DefaultDS">
<attribute name="PoolName">DefaultDS</attribute>
<attribute
name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attr
ibute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://localhost:3306/yourdatabase</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser">yourlogonid</attribute>
<attribute name="MaxSize">10</attribute>
<attribute name="Password">yourpassword</attribute>
<attribute name="GCEnabled">true</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">true</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">2</attribute>
</mbean>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to