Re: Pooling of connections/sessions
Wednesday, October 9, 2002 06:07 AM
You need to follow JMS restriction of Session per Thread.
What I did was implemented my own Session pool per thread and kept them in a hash for future use by the same thread.
For each thread you can create a Sender/Receiver by using the session.
Each thread has a unique key by its name and each session is attached to a thread.
With another paameter (e.g. opCode) you can create a Sender per Session and hold it as well for future use.
Other objects - QueueConnectionFactory/QueueConnection are created once.
Hope it helps.