users@genericjmsra.java.net

Re: Sun MQ and MDB

From: J. Seah <jonjonseah_at_hotmail.com>
Date: Tue, 02 May 2006 05:47:10 +0000

Well it is an ejb which generates the JMS message and sends it to the Sun
MQ.

Is there any facility for me to determine the redilivery count that the MDB
has been trying to process?

I've noticed that there is JMSDeliveryCount in the JMS specs but I don't
think Sun MQ implements this though. I was hoping to create my own
application specific JMS property in the message headers but I get teh error
message as indicated below.

Any ideas?

thanks

>From: Binod <Binod.Pg_at_Sun.COM>
>Reply-To: users_at_genericjmsra.dev.java.net
>To: users_at_genericjmsra.dev.java.net
>Subject: Re: Sun MQ and MDB
>Date: Tue, 02 May 2006 10:59:54 +0530
>
>I dont think you can do any thing with the incoming message.
>If it is just for testing purpose, you might need to update a db with
>a non transactional connection. For example, you can insert a
>table whose key is message Id and value is number of deliveries.
>
>- Binod.
>
>>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
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
>>For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
>For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>