Atomikos Forum |
|
The tomcat integration as explained at: http://www.atomikos.com/Documentation/Tomcat6Integration33 works even without making fllowing entry in server.xml-
<Listener className="com.atomikos.tomcat.AtomikosLifecycleListener" /> I think document should be updated accordingly. Thanks, Vinod
Starting with 3.5.3 it is REQUIRED but it needs changes :
START_EVENT must be replaced with BEFORE_START_EVENT STOP_EVENT must be replaced with AFTER_STOP_EVENT but starting with atomikos 3.5.3 you NEED to explicitly do the init() : utm = new UserTransactionManager(); try { utm.init(); } catch (SystemException e) { e.printStackTrace(); } or it is possible you end up with errors like this : 09-03-10 16:38:48,729 [Timer-8] pdos: refreshed XAResource 09-03-10 16:38:49,200 [Timer-8] skas: refreshed XAResource 09-03-10 16:38:49,248 [Timer-8] dbtemp: refreshed XAResource 09-03-10 16:38:52,543 [Timer-66] AtomikosDataSoureBean 'dbtemp': getConnection ( null )... 09-03-10 16:38:52,543 [Timer-66] AtomikosDataSoureBean 'dbtemp': init... 09-03-10 16:38:52,544 [Timer-66] atomikos connection pool 'dbtemp': error while trying to recycle java.lang.NullPointerException at com.atomikos.jdbc.AtomikosXAPooledConnection.canBeRecycledForCallingThread(AtomikosXAPooledConnection.java:134) at com.atomikos.datasource.pool.ConnectionPool.recycleConnectionIfPossible(ConnectionPool.java:77) at com.atomikos.datasource.pool.ConnectionPool.borrowConnection(ConnectionPool.java:107) at com.atomikos.jdbc.AbstractDataSourceBean.getConnection(AbstractDataSourceBean.java:285) at com.atomikos.jdbc.AbstractDataSourceBean.getConnection(AbstractDataSourceBean.java:337) ...... WARNING: transaction manager not running? |