Hi,

I am using atomikos version 3.6.4 in my project and connecting to two different schemas on a Database. My data sources are "AtomikosDataSourceBean" and using jdbcTemplate for querying database. Type of my transaction is "com.atomikos.icatch.jta.UserTransactionManage r" as defined below:

<bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionMana ger" init-method="init" destroy-method="close">
<property name="forceShutdown"><value>true</value></property>
</bean>

<bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" >
<property name="transactionTimeout">
<value>15</value>
</property>
</bean>

<bean id="AppTransactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
<property name="transactionManager">
<ref bean="atomikosTransactionManager"/>
</property>
<property name="userTransaction">
<ref bean="atomikosUserTransaction"/>
</property>
</bean>

I am sending select and update queries to one of these schemas and not using other one. But I have faced performance problem on :

- first db query (select query)
- transaction commit step.

It waits 5-6 seconds on the first query and transaction commit process. I taked thread dump and saw there are 4 Atomikos thread which are parked

"Atomikos:3" daemon prio=3 tid=0x00add800 nid=0x9b waiting on condition [0xbe5ff000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xf7c268c8> (a java.util.concurrent.SynchronousQueue$TransferStac k)
at java.util.concurrent.locks.LockSupport.parkNanos(L ockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStac k.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStac k.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(Synchro nousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(Th readPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)

"Atomikos:2" daemon prio=3 tid=0x01e63000 nid=0x9a waiting on condition [0xbe6ff000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xf7c268c8> (a java.util.concurrent.SynchronousQueue$TransferStac k)
at java.util.concurrent.locks.LockSupport.parkNanos(L ockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStac k.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStac k.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(Synchro nousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(Th readPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)

"Atomikos:1" daemon prio=3 tid=0x01e62400 nid=0x99 in Object.wait() [0xbe7ff000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xebe67df8> (a java.lang.Object)
at com.atomikos.timing.PooledAlarmTimer.doWait(Pooled AlarmTimer.java:97)
- locked <0xebe67df8> (a java.lang.Object)
at com.atomikos.timing.PooledAlarmTimer.run(PooledAla rmTimer.java:63)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

"Atomikos:0" daemon prio=3 tid=0x00832c00 nid=0x98 waiting on condition [0xbf4ff000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xf7c268c8> (a java.util.concurrent.SynchronousQueue$TransferStac k)
at java.util.concurrent.locks.LockSupport.parkNanos(L ockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStac k.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStac k.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(Synchro nousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(Th readPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)

Do you have any comments on this performance issue?