The appclient runner does all sorts of cleanup after running your code. I can make my standalone JMS client exit too, by calling System.exit(0)!
I have just been trying to move to Glassfish from Weblogic JMS (we use the JMS provider to communicate between several stand alone JVM processes), and have the same issue; I can create queues and send and recieve messages, but when I close everything, there are still two daemon threads running (imqConnectionFlowControl-0 and iMQReadChannel-0), and this prevents the client from exiting. These daemons seem to be created when the connection factory is initialised, rather than when the queues are created.
Is anyone looking at this? Is there any solution in the pipeline? Weblogic makes this all very easy and painless, this is not proving to be the case with Glassfish at the moment.
Thanks
[Message sent by forum member 'tombomory' (tombomory)]
http://forums.java.net/jive/thread.jspa?messageID=294635