JMS connection issues
"Govinda Rao Deyyam" <[email protected]> Thu, 26 Apr 2007 15:00:25 +0530
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <CAE7CE4D34AA7848816555DF1ED16D27025A5CD9@MYSHECMSG01.ad.infosys.com> |
Dear Users,
I have few queries on JMS connection mechanism.
I have tried running the example programs (SimpleReceiver, SimpleSender)
and found a strange thing.
I am printing the connection object after getting the connection from
the factory object, code given below
QueueConnectionFactory factory = (QueueConnectionFactory)
context.lookup(factoryName);
QueueConnection connection =
factory.createQueueConnection();
connection.start();
System.out.println("connection is : "+connection);
But I am getting the same connection object every time when I run this
program, given the results below. When the program is closed the objects
instantiated by that program should also be freed and when we run the
program next time new objects should be created but its not happening in
this case.
Example, same object is getting returned for the SenderProgram every
time we run, same object getting returned for Receiver program every
time we run. But the object is different for sender and receiver
programs (have highlighted below).
Even if I close the connection at the end of the program the same object
is getting returned when I run the program second, third..etc times.
Could anyone please explain this funda?
Sender program:
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleSender -queue request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@6b7920
Publishing org.exolab.jms.message.BytesMessageImpl@1cdeff
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleSender -queue request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@6b7920
Publishing org.exolab.jms.message.BytesMessageImpl@1cdeff
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleSender -queue request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@6b7920
Publishing org.exolab.jms.message.BytesMessageImpl@1cdeff
Receiver Program:
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleReceiver -queue
request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@63b895
[1 of 1] ObjectMessage JMSDeliveryMode=PERSISTENT, Priority=4,
JMSMessageID=ID:4734191357462726621
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleReceiver -queue
request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@63b895
[1 of 1] ObjectMessage JMSDeliveryMode=PERSISTENT, Priority=4,
JMSMessageID=ID:2767882215716415820
E:\openjms-0.7.5\src\examples\openjms\examples\client\console>java -cp
%classpath% openjms.examples.client.console.SimpleReceiver -queue
request2
-mode tcp -jndiport 3055 -jndihost localhost -count 1
connection is : org.exolab.jms.client.JmsQueueConnection@63b895
[1 of 1] ObjectMessage JMSDeliveryMode=PERSISTENT, Priority=4,
JMSMessageID=ID:2767882215716415819
Q2. Is there any possibility that JMS Server closes the connection after
some inactive time (might be configurable)?
We are currently facing one problem where the connection is
getting closed after some inactive time; we are suspecting that firewall
is closing this connection, due to this we are getting
illegalStateException when we call any operation on the connection
object.
I appreciate the earliest response.
Thanks & Regards
Govinda Rao
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user