|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
help. about jms and MQ |
« View previous topic :: View next topic » |
Author |
Message
|
ajsc |
Posted: Sun Apr 11, 2004 7:47 pm Post subject: help. about jms and MQ |
|
|
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 |
|
 |
jefflowrey |
Posted: Mon Apr 12, 2004 2:50 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|