-
1. Re: Connection
nphelps Oct 17, 2001 12:42 AM (in response to amit)Per the JMS spec, Connections are heavy-weight objects, and thus you want to create as few as possible. The general strategy is to create only one Connection. So...
1.) Get the JNDI InitialContext
2.) Look up the ConnectionFactory
3.) Obtain a Queue/TopicConnection from the ConnectionFactory
4.) Use the Connection factory method to create a Session. The JMS spec states that Session are not heavy-weight objects, so the general strategy is to partition your workload across several Sessions.
5.) Look up the destination
etc...
On an additional note, once you have looked up at ConnectionFactory or Destination there is no need to look it up again. Just hang on to the reference and keep using it. -
2. Re: Connection
kar2000 Jul 17, 2003 4:41 AM (in response to amit)Well, I have a doubt in this regard - is there any means of finding in the jboss server side and not in the database server side,
how many connections are there in the pool,
how many connections are in use and
how many connections are being returned at a given point of time?