users@glassfish.java.net

Re: JMS connection

From: <glassfish_at_javadesktop.org>
Date: Mon, 22 Jun 2009 04:33:01 PDT

>
> BTW, after some tests, I "can" confirm that the
> connection is not closed as
> soon as the close() method is called (I need further
> investigation to
> understand if it is closed after the method call or
> after the SLSB is
> destroyed).
>

When you close a JMS connection from the session bean, the connection will be returned to the pool and will not necessarily be closed. The idea is that the next time your application needs to create a connection one can be returned from the pool without the need to incur the overhead of creating it.

If a connection remains unused in the pool it will be removed from the pool (and the underlying JMS connection closed) after an idle timeout has expired.

The various configuration options for a JMS connection pool are documented (for Glassfish 2.1) here:
http://docs.sun.com/app/docs/doc/820-4335/gicpj?a=view

Nigel
[Message sent by forum member 'nigeldeakin' (nigeldeakin)]

http://forums.java.net/jive/thread.jspa?messageID=352335