I have a problem using a Consumer in Glassfish with JMS configured as LOCAL.
My application receives a request and creates a connection, session and consumer. Then it passes the consumer to another thread that periodically calls receive on the consumer to poll for new messages.
This works fine with JMS configured as EMBEDDED however when configured as LOCAL after the thread that creates the consumer completes the consumer is automatically closed which means that subsequent calls to receive messages in my other thread give errors.
I have found that setting the Transaction Support to NoTransaction in my JMS Connection Factory removes this error.
I have two questions:
1) If no transaction support is specified in a JMS Connection what is the default behaviour in the EMBEDDED and LOCAL JMS configurations?
2) With a LOCAL JMS configuration what would i have to do to be able to use my consumer inside a transaction?
Thanks
[Message sent by forum member 'maxmil' (maxmil)]
http://forums.java.net/jive/thread.jspa?messageID=286466