-
1. Re: Multiple Ports are opened while pushing message to Queue
mnovak Mar 20, 2014 5:27 AM (in response to murthy516)Can you share your standalone...xml?
-
2. Re: Re: Multiple Ports are opened while pushing message to Queue
murthy516 Mar 20, 2014 5:58 AM (in response to mnovak)Thanks Novak for reply.Please find the attached standalone-full.xml
-
standalone-full.xml 25.9 KB
-
-
3. Re: Multiple Ports are opened while pushing message to Queue
ctomc Mar 20, 2014 6:27 AM (in response to murthy516)With this code, you get exactly behavior you described
What you do is, open new connection everytime you send a (new) message.
and on the end you don't close connection to the server, as you dont close initial context.
I would recommend you to change a code a bit that wont be opening new connection to server for ever message sent.
by creating initial context only once and reuse it.
if noting else, close ctx in finally block.
-
4. Re: Multiple Ports are opened while pushing message to Queue
murthy516 Mar 20, 2014 6:40 AM (in response to ctomc)Hi Tomaz,
Thanks for the suggestions provided.If I've not closed the connection in finally block,and if i remove those qsession.close(),qsender.close();,qcon.close() statements in finally block(above code),when that connection will be closed after publishing of all 1000 messages.And how to use that ctx that created once in all publishing messages.I should not create new connection in code sending the every message,how can i reuse that context.Kindly help me out in achieving the same.