Hi All,
I'm trying to use Sun MQ and MDBs. What happens is that we punch messages to
Sun message queues. We have a MDB which reads of it and performs certain
actions dependent on the message type. There is a possiblity that teh
service that the MDB is reliant on could be down.
What I want this MDB to do is try the dependeant service a few times and if
not, it should throw it to Sun's dead message queue. How can I test the
number of times it has been redelivered?
I've been calling mdc.setRollbackOnly() to rollback the transaction.
I've tried doing
message.setIntProperty("count",count) but I get:
[#|2006-05-02T13:17:06.790+0800|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.stream.err|_ThreadID=301;|
javax.jms.MessageNotWriteableException: [C4011]: Write message failed.
at
com.sun.messaging.jmq.jmsclient.MessageImpl.checkAndSetProperty(MessageImpl.java:758)
at
com.sun.messaging.jmq.jmsclient.MessageImpl.setIntProperty(MessageImpl.java:1924)
at au.gov.wa.police.webservice.mq.MQMessageBean.onMessage(Unknown
Source)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
at
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:956)
at
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:42)
at
com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:130)
at $Proxy123.onMessage(Unknown Source)
at
com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:187)
at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
|#]
any ideas?
thanks in advanced