users@glassfish.java.net

ARRGGH - Glassfish/JMS/Web Tier Crazy!

From: Adam Jenkins <adamjenkinstmpredirect_at_yahoo.com.au>
Date: Tue, 12 May 2009 15:16:40 -0700 (PDT)

Hi All, I have two glassfish instances (on the same machine for now) being managed by a node agent. One is called web1 (web tier) the other is called enterprise1 (ejbs and message driven beans etc). I have a JMS queue that has both as the target...but when I put a message on the queue from enterprise1 (or when using hermes) it won't retrieve it in the web tier. The result from MessageConsumer.retrieve is a null object (which indicates that the connection may be being closed somewhere??). Interestingly, I changed my code so that, rather than injecting the queue and queueConnectionFactory using @Resource, I create a remote targetted InitialContext (pointing directly at enterprise1 and the associated port) by code and ran it...same thing happened...null Message. Then I took that remote code and copy and pasted it into a java test application (just a good old fashioned public static void main(...)) and it worked fine! It retrieved the text message off the queue. Can anyone suggest why there might be a problem here...it's not like it can't connect...I can lookup the QueueConnectionFactory, look up the Queue, create and start the Connection, create the session and try to retrieve the message...but the message is just null! Any help would be really appreciated, we're desperately trying to get an application that's been two years in developments, and tested extensively in a dev environment, deployed into production and keep hitting really odd things like this. Cheers Adam Need a Holiday? Win a $10,000 Holiday of your choice. Enter now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/creativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p3=mailtagline