ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Java MQ Multi-Threading Sample Programs

Post new topic  Reply to topic
 Java MQ Multi-Threading Sample Programs « View previous topic :: View next topic » 
Author Message
krishs
PostPosted: Mon Feb 11, 2002 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kolban
PostPosted: Mon Feb 11, 2002 6:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Naftalanja
PostPosted: Wed Feb 13, 2002 10:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Java MQ Multi-Threading Sample Programs
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.