Hi

Did you check the dlq? What's your prefetch policy?
Le 26 nov. 2013 06:43, "ZhongGuan" <[email protected]> a écrit :

> I test it in another environment, also a very simple example of MDB using
> BMT
> and throw RuntimeException.
> But it does not work. :(
>
> Here is My MDB code
> @MessageDriven(activationConfig = {
>         @ActivationConfigProperty(propertyName = "destination",
> propertyValue = "FooQueue"),
>         @ActivationConfigProperty(propertyName = "destinationType",
> propertyValue = "javax.jms.Queue"),
>         @ActivationConfigProperty(propertyName = "acknowledgeMode",
> propertyValue = "Auto-acknowledge")})
> @TransactionManagement(TransactionManagementType.BEAN)
> public class HelloMDB implements MessageListener {
>
>     @Override
>     public void onMessage(Message arg0) {
>         System.out.println(1111111);
>         throw new RuntimeException();
>     }
>
> }
>
> And here is the info on console after the first Exception. and the message
> does not redelivery.
>
> java.rmi.RemoteException: The bean encountered a non-application exception;
> nested exception is:
>         java.lang.RuntimeException
>         at
>
> org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException(EjbTransactionUtil.java:154)
>         at
> org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:434)
>         at
> org.apache.openejb.core.mdb.MdbContainer.invoke(MdbContainer.java:387)
>         at
>
> org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:227)
>         at
>
> org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:168)
>         at example.HelloMDB$LocalBeanProxy.onMessage(example/HelloMDB.java)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
>         at
> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:861)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
>         at
>
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:366)
>         at
>
> org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: java.lang.RuntimeException
>         at example.HelloMDB.onMessage(HelloMDB.java:24)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
> org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:126)
>         at
> org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:42)
>         at
> org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:63)
>         at
> org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:69)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
>
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
>         at
> org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:416)
>         ... 13 more
> 11 26, 2013 2:27:47 午後 org.apache.activemq.ActiveMQSession run
> 重大: error dispatching message:
> javax.ejb.EJBException
>         at
>
> org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:251)
>         at
>
> org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:168)
>         at example.HelloMDB$LocalBeanProxy.onMessage(example/HelloMDB.java)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
>         at
>
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
>         at
> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:861)
>         at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
>         at
>
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:366)
>         at
>
> org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: java.rmi.RemoteException: The bean encountered a non-application
> exception; nested exception is:
>         java.lang.RuntimeException
>         at
>
> org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException(EjbTransactionUtil.java:154)
>         at
> org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:434)
>         at
> org.apache.openejb.core.mdb.MdbContainer.invoke(MdbContainer.java:387)
>         at
>
> org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:227)
>         ... 11 more
> Caused by: java.lang.RuntimeException
>         at example.HelloMDB.onMessage(HelloMDB.java:24)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
> org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:126)
>         at
> org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:42)
>         at
> org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:63)
>         at
> org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:69)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>         at
>
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
>         at
> org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:416)
>         ... 13 more
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/redelivery-of-MDB-with-BMT-tp4666382p4666418.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to