hi folks,
i try to stop message-delivery of a queue in case of error.

  | public class DocImportProcessorBean implements javax.ejb.MessageDrivenBean, 
javax.jms.MessageListener {
  | ...
  |   
  | public void onMessage(Message message) {
  |    try {
  |       ...
  |    } catch (Exception ex) {
  |       System.err.println("trace 1");
  |       MBeanServer server = MBeanServerLocator.locateJBoss();
  |       System.err.println("trace 2");
  |       server.invoke(new ObjectName(objectNameDocImportQueue), 
"stopDelivery", new Object[] {}, null);
  |       System.err.println("trace 3");
  |       sc.setRollbackOnly();
  |       System.err.println("trace 4");
  |    }
  | }
  | }
  | 

result:
messagedelivery is stopped, but i don't get back the control after the 
statement "server.invoke..."  (bug or feature?)
console:

  | trace 1
  | trace 2
  | 

serverlog:

  | 2005-11-17 22:43:40,531 DEBUG 
[org.jboss.ejb.plugins.jms.JMSContainerInvoker] Stop requested
  | 2005-11-17 22:43:40,531 DEBUG 
[org.jboss.ejb.plugins.jms.JMSContainerInvoker] innerStop
  | 2005-11-17 22:43:40,531 DEBUG 
[org.jboss.ejb.plugins.jms.JMSContainerInvoker] unset exception listener
  | 2005-11-17 22:43:40,531 DEBUG 
[org.jboss.ejb.plugins.jms.JMSContainerInvoker] connection stopped
  | 2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] 
Stopping DLQHandler
  | 2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] 
Stopped DLQHandler
  | 


after 5 minutes, i get a timeout:

  |      [exec] 22:48:40,187 WARN  [TransactionImpl] Transaction 
TransactionImpl:XidImpl[FormatId=257, GlobalId=evian/26, BranchQual=, 
localId=26] timed out. status=STATUS_MARKED_ROLLBACK
  | 

start/stop messagedelivery in this 5 minutes by using the jmx-console works 
fine.

do i have to follow a rule when i stop messagedelivery?

thank you for response!!
marc


(i'm using jboss-4.0.3sp1)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3907740#3907740

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3907740


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to