activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Closing Producers
Date Tue, 29 Jul 2008 07:25:07 GMT
BTW to avoid having to write all the code to explicitly close things
down you can use the JmsTemplate or MessageListenerContainer helper
classes in the spring framework.

2008/7/28 rodih <roded.hess@gmail.com>:
>
> Thanks for the quick response. I will take your advice and will close
> resources explicitly.
> BTW, Are connections and session behave the same (are closing resources the
> same as consumers/producers when finalized).
>
> Thanks again.
>
>
> rajdavies wrote:
>>
>>
>> On 28 Jul 2008, at 07:17, rodih wrote:
>>
>>>
>>> Hi,
>>> If I define a new producer or consumer as a local variable will it
>>> be closed
>>> (Closed + Garbage collected at some point) once the method returns?
>>>
>>> Thanks.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Closing-Producers-tp18684689p18684689.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>
>> Yes they should be if you use  ActiveMQ  - however I wouldn't
>> recommend it - as its specific to ActiveMQ  (not every JMS client will
>> do the same) - and gc is not very deterministic anyway.
>> It would be better to close them explicitly
>>
>>
>>
>>
>> cheers,
>>
>> Rob
>>
>> http://open.iona.com/products/enterprise-activemq
>> http://rajdavies.blogspot.com/
>>
>>
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Closing-Producers-tp18684689p18688165.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message