JMS Interrupted exception
oz_ko Aug 17, 2004 9:48 PMPlatform:
jsdk 1.4.2_05-b04
jboss 3.2.5
WinXP
I'm using a directory poller called jpoller ( http://jpoller.sourceforge.net/ ) which i've implemented as a SAR ( the sar lives in an ear atm )
The DirectoryPollManager receives an event when a file appears in a directory. The file is loaded ( file size < 1k ) and posted as a text message to a queue where a MDB poccesses the message. (There is no security on the queue so don't be fooled by "cannot authenticate user", its a red herring.)
When using the IUL2 ( not JVM invocation ) I'm getting an InterruptedException.
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.lang.InterruptedException)
at org.jboss.mq.Connection.authenticate(Connection.java:1161)
at org.jboss.mq.Connection.<init>(Connection.java:248)
at org.jboss.mq.Connection.<init>(Connection.java:325)
at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:66)
at org.jboss.mq.SpyConnectionFactory.createConnection(SpyConnectionFactory.java:87)
at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:124)
at au.com.service.DirectoryPollManager.sendMessage(DirectoryPollManager.java:74)
at au.com.DirectoryPollManager.fileSetFound(DirectoryPollManager.java:48)
at org.sadun.util.polling.DefaultListener.receive(DefaultListener.java:40)
at com.deltax.util.listener.SignalQueue.run(SignalQueue.java:60)
Caused by: java.lang.InterruptedException
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.put(LinkedQueue.java:94)
at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:239)
at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:192)
at org.jboss.mq.il.uil2.UILServerIL.authenticate(UILServerIL.java:307)
at org.jboss.mq.Connection.authenticate(Connection.java:1153)
... 9 more
I'm not sure why this would be happening. The problem is somehere in
EDU.oswego.cs.dl.util.concurrent.LinkedQueue.put(..)
As you can see the thread that puts the message on the LinkedQueue is the same
thread that read the file, but it is not the same thread that the directory poller
service runs on (though I don't think this should be a problem).
jboss.xml:
<message-driven> <ejb-name>OAMPSMessageInMDB</ejb-name> <destination-jndi-name>queue/oampsQueueIn</destination-jndi-name> <resource-ref> <res-ref-name>jms/QCF</res-ref-name> <jndi-name>ConnectionFactory</jndi-name> </resource-ref> </message-driven>
ejb.jar:
<message-driven> <ejb-name>MessageInMDB</ejb-name> <ejb-class>au.com.message.MessageInMDB</ejb-class> <transaction-type>Container</transaction-type> <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode> <message-driven-destination> <destination-type>javax.jms.Queue</destination-type> </message-driven-destination> <resource-ref> <res-ref-name>jms/QCF</res-ref-name> <res-type>javax.jms.QueueConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> </message-driven>
jbossmq-destinations-service.xml:
<mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=QueueIn"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> </mbean>
Anybody have ideas if this is a bug or PEBKAC? Or how to diagnose it further? Maybe a solution?
Oz