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 » JMS / Websphere /MQ Series questions

Post new topic  Reply to topic
 JMS / Websphere /MQ Series questions « View previous topic :: View next topic » 
Author Message
prash
PostPosted: Wed Nov 26, 2003 4:07 am    Post subject: JMS / Websphere /MQ Series questions Reply with quote

Newbie

Joined: 26 Nov 2003
Posts: 6

Hi all,
I'm facing a scenario where i need to stop the MDBs from receiving messages from MQ Queue on certain conditions happeing in the application. I've tried some scenarios , but was not able to arrive at a neat and clean soln. Here's what i tried.
1. Trying to stop websphere JMS listener service from within the MDB
using websphere JMX interface.
The solution manages to stop the service , but leaves it at a hanged
state.A transaction timed out message appears on websphere console
after couple of minutes.The admin has to restart the server to get the
listener running again, and there is a lost transaction.
2. Tried a bad programming practice to start a thread from MDB and
use JMX to switch off the listerner port
This worked well with no errors.Admin can restart the service without
restarting the app server.(This of course is not a good practice)
3. Send a message to a websphere JMS queue, which triggers another
an MDB, which in turn uses JMX to stop the Listener port
I'm getting this message in the exception
[11/26/03 17:13:15:453 IST] 1f7ab9b5 TransactionIm E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
[11/26/03 17:13:15:547 IST] 1f7ab9b5 LocalTransact E J2CA0030E: Method enlist caught java.lang.IllegalStateException
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:567)
at com.ibm.ejs.jts.jta.JTSXA.enlistResource(JTSXA.java:1061)
at com.ibm.ejs.jts.jta.JTSXA.enlistOnePhase(JTSXA.java:1038)
at com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:507)
at com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEventListener.java:568)
at com.ibm.ej

Can anybody suggest why is the exception coming .
Is there a way to stop the MDB from receiving the messages.
Is there a way to specify the "message redelivery interval" (time interval between redelivery of messages in case it is rolled back).
What would be the best way to process data sequentially in MDB. i.e process the first message first , then second third and so on.

Thanks in advance
Prashant
Back to top
View user's profile Send private message
kolban
PostPosted: Mon Dec 08, 2003 9:03 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

My understanding of MDB's is that you want the delivery of messages to be controlled by the container. I don't believe anywhere in the J2EE spec are any admin APIs that are "legal" to ask the container to stop processing messages.

If you want ownership of message delivery, consider running stateless session beans that explicititly listen for messages themselves and hence can shut themselves down when needed. I suspect that this would be a cleaner and more portable solution.
Back to top
View user's profile Send private message
kman
PostPosted: Wed Dec 10, 2003 11:55 pm    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

Take a look at this,
http://www.mqseries.net/phpBB2/viewtopic.php?t=11675
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS / Websphere /MQ Series questions
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.