Re: Session closed suddenly
Ken M <wgold-WNUMbkg7HQH83n0zhJamUgC/[email protected]>
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Jyrki -
Without being on the JMS staff, I can only say that holding a Session
object alive works well for us.
We create a server with a single JMS Session and Topic connection to
pump events for the lifetime of the server - which is sometimes weeks.
So far no reported difficulties.
Ken
Jyrki Saarinen wrote:
> Tim Anderson wrote:
>
>> There are a couple of possibilities:
>> . someone is invoking close() on the Connection
>> that owns the Session
>> . the physical connection to the server has been lost. This forces
>> closure of the Sessions attached to the Connection
>>
>> You can verify if this is the case by registering
>> an exception listener with the connection e.g.:
>>
>> connection.setExceptionListener(new ExceptionListener() {
>> public void onException(JMSException exception) {
>> exception.printStackTrace();
>> }
>> };
>>
> Does anyone know whether this pattern of having Session object alive
> for a long time OK? Or should I create a new Session object every time
> when I want to publish a message and then close the Session?
>
> Jyrki
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> openjms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openjms-user
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click