[jboss-jira] [JBoss JIRA] Created: (JBAS-4697) Use of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.toArray() is not thread safe and should be replace with java.util.concurrent.ConcurrentHashMap when using MQ transactions.
Jay Howell (JIRA)
jira-events at lists.jboss.org
Mon Sep 10 14:06:11 EDT 2007
Use of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.toArray() is not thread safe and should be replace with java.util.concurrent.ConcurrentHashMap when using MQ transactions.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBAS-4697
URL: http://jira.jboss.com/jira/browse/JBAS-4697
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.2.0.GA
Reporter: Jay Howell
Assigned To: Adrian Brock
Fix For: JBossAS-4.2.2.GA
Custom Transaction engine throws the following exception...
SEVERE: TransactionManager
org.jboss.mq.SpyXAException: Resource manager error during recover; - nested throwable: (org.jboss.mq.SpyJMSException: Cannot recover; - nested throwable:
(java.util.NoSuchElementException))
at org.jboss.mq.SpyXAException.getAsXAException(SpyXAException.java:72)
at org.jboss.mq.SpyXAResource.recover(SpyXAResource.java:166)
at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.recover(JcaXAResourceWrapper.java:98)
at com.gs.fw.aig.ljtm.LJTMTransactionManager.tryToRecover(LJTMTransactionManager.java:941)
Caused by: org.jboss.mq.SpyJMSException: Cannot recover; - nested throwable: (java.util.NoSuchElementException)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
at org.jboss.mq.Connection.recover(Connection.java:1142)
at org.jboss.mq.SpyXAResourceManager.recover(SpyXAResourceManager.java:325)
at org.jboss.mq.SpyXAResource.recover(SpyXAResource.java:162)
... 76 more
Caused by: java.util.NoSuchElementException
at EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$HashIterator.next(ConcurrentHashMap.java:1131)
at java.util.AbstractCollection.toArray(AbstractCollection.java:176)
at org.jboss.mq.pm.TxManager.recover(TxManager.java:317)
at org.jboss.mq.server.JMSDestinationManager.recover(JMSDestinationManager.java:502)
at org.jboss.mq.server.JMSServerInterceptorSupport.recover(JMSServerInterceptorSupport.java:197)
at org.jboss.mq.server.JMSServerInterceptorSupport.recover(JMSServerInterceptorSupport.java:197)
at org.jboss.mq.server.TracingInterceptor.recover(TracingInterceptor.java:769)
at org.jboss.mq.server.JMSServerInvoker.recover(JMSServerInvoker.java:203)
at org.jboss.mq.il.jvm.JVMServerIL.recover(JVMServerIL.java:188)
at org.jboss.mq.Connection.recover(Connection.java:1137)
... 78 more
The EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.toArray() calls values() which is not thread safe. This needs to be switched to java.util.concurrent.ConcurrentHashMap.
The class org.jboss.mq.pm.TxManager needs to be changed to use java.util.concurrent.ConcurrentHashMap.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list