-
1. Re: queue connection
adrian.brock Sep 17, 2003 10:50 AM (in response to mhemling)The best method is to "pool" sessions.
Your lockup is probably due to concurrent use of session
objects that is not externally synchronized. See the spec.
Regards,
Adrian -
2. Re: queue connection
mhemling Sep 17, 2003 11:16 AM (in response to mhemling)thanks.
When you say "pool" sessions do you mean create a connection to the queue once and never close and use multiple sessions? Let's assume that data keeps flowing into my application. I then need to get the data onto the queue quickly without opening and closing a connection each time.
How do you go about session pooling?
I had a suspicion that I needed to synchronize my calls. I had assumed that JBOSS took care of that.
thanks again -
3. Re: queue connection
adrian.brock Sep 17, 2003 11:20 AM (in response to mhemling)JBoss takes care of it inside the appserver.
See the jca connectionfactory "java:/JmsXA" defined in
jms-ds.xml
It is supposed to be usable on a client, but I've
never tried it.
Regards,
Adrian -
4. Re: queue connection
mhemling Sep 17, 2003 1:35 PM (in response to mhemling)In theory, as long as I keep everything synchronized can I have ONE connection that I never close?
My front end is a socket server that connects to a queue. I only need one connection. I do not want a connection going up and down everytime. -
5. Re: queue connection
adrian.brock Sep 17, 2003 1:44 PM (in response to mhemling)Provided you externally synchronize on the session
before sending messages, yes.
This will be less performant than creating one
session for each thread and depending on the
bandwidth/latency you might want to create multiple connections? Think of the connection as a pipe with
multiple inlets (the sessions).
The connection is internally synchronized, the session
is not.
Regards,
Adrian