Proper life cycle management with springsupport.jar

View: New views
6 Messages — Rating Filter:   Alert me  

Proper life cycle management with springsupport.jar

by trichter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I read in the developer docs that to dispose of a SingeSharedConnectionFactory I am supposed to call #destroy() on it. However, in my springsupport.jar the SingeSharedConnectionFactory  does not have that method. Do I need to upgrade the springsupport.jar or is this a documentation mistake in http://www.swiftmq.com/developers/howto_jms_pooling/index.html.

General instruction on "zero-resource-waste" life cycle management would be good.

Best Regards,

Toralf Richter
TomTom Development Germany GmbH

Re: Proper life cycle management with springsupport.jar

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which springsupport.jar do you use? There is a change log on that page above. Just upgrade from the above page and you should have the destroy method.

The pooled objects usually time out. The destroy method also closes the connection and all dependend pools.

Re: Proper life cycle management with springsupport.jar

by trichter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I upgraded the springsupport.jar - I supposed the changes listed in the change log are the only changes in your code and we should not expect a changed behaviour, right?

I have another question - for the SingleSharedConnectionFactory, do I have any chance to set the sizes of the internally held pools in/by PooledSession, PooledConsumer, PooledProducer? If you deliberately don't give this opportunity to the outside I would like to know why, just to understand better.

Thanks again + best regards,

Toralf Richter
TomTom Development Germany GmbH

Re: Proper life cycle management with springsupport.jar

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

trichter wrote:
I upgraded the springsupport.jar - I supposed the changes listed in the change log are the only changes in your code and we should not expect a changed behaviour, right?
Right.

trichter wrote:
I have another question - for the SingleSharedConnectionFactory, do I have any chance to set the sizes of the internally held pools in/by PooledSession, PooledConsumer, PooledProducer? If you deliberately don't give this opportunity to the outside I would like to know why, just to understand better.
We do not block the application. The pools grow and shrink dependent on the load.


Re: Proper life cycle management with springsupport.jar

by trichter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hallo,

a question about shrink + grow: I suppose, when everything works over one connection, you will have certain number of sessions, producers, consumers working over this connection in a pooled way (right?).
Do these pools respect the maximum number of simultaneous sessions, consumers, producers over one connection as they are set in the router configuration? By respect I mean not create more than the configured numbers, avoiding exceptions caused by "too many sessions/consumers/producers on same connection".

best regards,
Toralf Richter

Re: Proper life cycle management with springsupport.jar

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The resource limits are checked at the router side anyway, not at the client. So these infos are not passed to the client and thus not available there.

The Springsupport was actually created to get over the limitations of Spring's JmsTemplate which creates a new connection, session, producer (and closes it) for each message sent over this template.

As I mentioned already, we do not block an application by putting it on hold while it waits on a pooled resource. Therefore you should limit the number of app threads using springsupport in the app itself.