On 11/29/2012 11:55 AM, Jan Bares wrote:
Hi,
does this recommendation also apply to Java JMS client? I have a connection
open all the time and create session, send message, close session for each
message to be sent.
Opening and closing a *session* for each message is a lot less expensive
than opening and closing a *connection*. It is still more work than
reusing a session of course, but that may not be a big deal in a given
scenario.
It works fine but after sending several thousands messages I got very strange
error:
javax.jms.IllegalStateException: Object AMQConnection:
Host: prgesbclu
Port: 5672
Virtual Host: test
Client ID: clientid
Active session count: 0 has been closed
at org.apache.qpid.client.Closeable.checkNotClosed(Closeable.java:70)
at
org.apache.qpid.client.AMQConnection.createSession(AMQConnection.java:616)
at
org.apache.qpid.client.AMQConnection.createSession(AMQConnection.java:608)
at
org.apache.qpid.client.AMQConnection.createSession(AMQConnection.java:602)
at
org.apache.qpid.client.AMQConnection.createSession(AMQConnection.java:82)
at
calypsox.tk.bo.document.PSEDocumentSender.sendImpl(PSEDocumentSender.java:104)
at
calypsox.tk.bo.document.CommonDocumentSender.send(CommonDocumentSender.java:231)
at
com.calypso.engine.advice.SenderEngine.handleEvent(SenderEngine.java:342)
at com.calypso.engine.advice.SenderEngine.process(SenderEngine.java:204)
at com.calypso.engine.Engine$EngineThread.run(Engine.java:1041)
Hmmm... are there any errors in the broker logs (or any preceding errors
on the client)... I would report this by JIRA, if you have a simple
reproducer that would be ideal. One guess is that the wrapping around of
channel ids might be at fault(?), but that is pure speculation.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org