|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Java MQ Multi-Threading Sample Programs |
« View previous topic :: View next topic » |
Author |
Message
|
krishs |
Posted: Mon Feb 11, 2002 6:11 am Post subject: |
|
|
Newbie
Joined: 03 Feb 2002 Posts: 8 Location: Chennai
|
I am not able find a sample Multi threaded java program for MQ.
This will be much useful to others too.
Can any body provide Multi threaded java program, with two threads accessing the same queue?
Thanx in Advance,
Krishs
[ This Message was edited by: krishs on 2002-02-11 06:12 ] |
|
Back to top |
|
 |
kolban |
Posted: Mon Feb 11, 2002 6:20 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
You have to be very careful here. In JMS, the spec states that multi-threaded support is not allowed. The queue may only be accessed from the thread in which the Session was created. This effectively negates multi-threaded use of JMS queues.
For MQ base Java, the restriction is relaxed but every access to a queue created from the same MQQueueManager object is synchronized (serialized) on that queue manager. So if one thread is performing a blocking get() on the queue, every other reference to ANY object created from a single MQQueueManager will be blocked. |
|
Back to top |
|
 |
Naftalanja |
Posted: Wed Feb 13, 2002 10:19 am Post subject: |
|
|
Acolyte
Joined: 30 Jan 2002 Posts: 63 Location: Los Angeles
|
I have a multithreaded client application wirtten in Java uwing JMS. But the freaking prob is that, it throws an unsatisfied link error after it posts 1800 messages in the specified Queue. I dont know the problem but its creating a lot of prob. Any guesses or help would be greatly appreciated !!!!! thanx |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|