[jboss-user] [JBoss Messaging] - Re: Messages delivery stops after a while
lieth78
do-not-reply at jboss.com
Wed Nov 8 08:26:58 EST 2006
anonymous wrote : 1)You are using the old JMS 1.0 API
|
You are right, I did not pay attention to this.
I will switch to Session/Connection instead of QueueSession/QueueConnection for a clean code.
Thanks for the advice.
anonymous wrote : 2) Why are you creating your receiver in the loop?
|
It is exactly the question I asked to myself when I looked back at my code yesterday! ;-)
That is why I changed my receiver variable to an instance attribute in the second version of my code.
anonymous wrote :
| This is poor practice. Not only will it be slow, it seems you are not closing them either
Well, you are right, I do not close the receiver... Am I supposed to do this?
The J2EE1.4 javadoc for the javax.jms.Connection interface indicates: "There is no need to close the sessions, producers, and consumers of a closed connection"... as I close the connection when the client stops, I though it was sufficiant. Am I wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984129#3984129
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984129
More information about the jboss-user
mailing list