History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-749
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Hiram Chirino
Reporter: Ning Li
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

ConnectionDotFileInterceptor not thread safe.

Created: 12/Jun/06 07:04 PM   Updated: 15/Jun/06 02:34 PM
Component/s: None
Affects Version/s: 4.0
Fix Version/s: 4.1.0, 4.0.1

Time Tracking:
Not Specified

Environment: Windows


 Description  « Hide
Unable to run multithreaded MQ application, even for the simplest case.

This is the peudo code, modified the ProducerTool.java

For ( thread 1 to 30 )
{
Connection connection = createConnection();
Session session = createSession(connection);
Producer producer = createProducer(session);
sendMessages(producer, 20); //send 20 messages to broker using all default settings
}

these are the exceptions from broker:
Caught: javax.jms.JMSException: java.util.ConcurrentModificationException
[cp://localhost/127.0.0.1:61616] ActiveMQConnection WARN Async exception with no exception listener: java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
at java.util.HashMap$EntryIterator.next(HashMap.java:829)
at java.util.HashMap$EntryIterator.next(HashMap.java:827)
at org.apache.activemq.broker.view.ConnectionDotFileInterceptor.printProducers(ConnectionDotFileInterceptor.java:157)
at org.apache.activemq.broker.view.ConnectionDotFileInterceptor.generateFile(ConnectionDotFileInterceptor.java:140)
at org.apache.activemq.broker.view.DotFileInterceptorSupport.generateFile(DotFileInterceptorSupport.java:47)
at org.apache.activemq.broker.view.ConnectionDotFileInterceptor.addProducer(ConnectionDotFileInterceptor.java:85)
at org.apache.activemq.broker.MutableBrokerFilter.addProducer(MutableBrokerFilter.java:90)
at org.apache.activemq.broker.AbstractConnection.processAddProducer(AbstractConnection.java:397)
at org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:100)
at org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
at java.lang.Thread.run(Thread.java:595)

and exception in the client side:
javax.jms.JMSException: java.util.ConcurrentModificationException
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:45)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1137)
at org.apache.activemq.AdvisoryConsumer.<init>(AdvisoryConsumer.java:45)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1227)
at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:435)
at com.businessobjects.framework.services.mq.ToolSupport.createConnection(ToolSupport.java:51)
at com.businessobjects.framework.services.mq.ProducerTool.run(ProducerTool.java:106)



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Hiram Chirino - 12/Jun/06 08:29 PM
As a simple workaround, disable the dot file broker plugin.

Hiram Chirino - 15/Jun/06 02:34 PM
Added synchronization to make thread safe.