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 Java / JMS » help. about jms and MQ

Post new topic  Reply to topic
 help. about jms and MQ « View previous topic :: View next topic » 
Author Message
ajsc
PostPosted: Sun Apr 11, 2004 7:47 pm    Post subject: help. about jms and MQ Reply with quote

Newbie

Joined: 11 Apr 2004
Posts: 3

Im using websphere application server as my ejb container and MQSeries as messenging servive (both are on different PC's). I have a problem. hope someone can help me.

Here is my scenario.
I have a JSP, Session Bean (Stateless), and Some Java Classes. The JSP passes some information to the Session Bean. Then the session bean calls on the java classes. The java classes creates a connection factory and topic for the JMS. Then another class sends the message using the send method of a QueueSender. After sending, I ran a for loop, that counts the number of seconds. I have a Thread.sleep(1000) in my for loop to count the seconds. An MDB listens to the JMS, and does something to the message if there is a message received.

Here is my problem.
When sending the the message to the JMS, then running the for loop with a thread, it seems that the MDB does not get the message, it first runs the for loop, then after the for loop is finished, it is then the MDB gets the message. Why is this so? It seems that the thread hogged the processor, and the MDB did not do anything until the thread was finished. I was expecting that during the loop, since the thread is placed in a sleep state (with Thread.sleep(1000)), the MDB should have gotten the message.

Please help. Is there a work around on this? Or is there some configuration that I should do in WAS?

Thank you.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Apr 12, 2004 2:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The put is not gettting committed until your session bean ends it's transaction.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » help. about jms and MQ
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.