[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-783) jms message disappeared from db then exception is occured
Ramil Israfilov (JIRA)
jira-events at lists.jboss.org
Fri Jun 1 03:17:12 EDT 2007
[ http://jira.jboss.com/jira/browse/EJBTHREE-783?page=comments#action_12363818 ]
Ramil Israfilov commented on EJBTHREE-783:
------------------------------------------
The problem is that Exception which is thrown is RuntimeException.
Just let follow stacktrace:
Exception occurs at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:183)
this line is in the block which surrounded by
catch (Throwable t)
{
log.error("Unexpected error delivering message " + message, t);
if (td != null)
td.error();
runtimeHandler.handleRuntimeError(t);
}
runtimeHandler is
RuntimeErrorHandler runtimeHandler = new DefaultRuntimeErrorHandler();
And what do DefaultRuntimeHandler is just rethrow exception:
---
public void handleRuntimeError(Throwable t)
{
if(t instanceof RuntimeException || t instanceof Error)
throw (RuntimeException)t;
}
----
As it is retrown we go upper in stacktrace
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
This line is not surroened by try/catch.
We go further:
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
there is also no try/catch block
and now interesting point:
org.jboss.mq.SpySession.run(SpySession.java:323)
It is surrounde with very interesting try/catch block:
catch (Throwable ignore)
{
if (trace)
log.trace("Ignored error from session consumer", ignore);
}
What does it mean ? it mean that our our error catched, but nothing happens to our transaction !! It means it is not set to rollback
and of course during ending of transaction it is committed and message is gone.
> jms message disappeared from db then exception is occured
> ---------------------------------------------------------
>
> Key: EJBTHREE-783
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-783
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: EJB 3.0 RC9 - FD
> Environment: JBOSS 4.0.5.GA, JDK1.5.0_06, solarisx86, clustered on two nodes
> Reporter: Ramil Israfilov
> Assigned To: William DeCoste
> Priority: Blocker
> Fix For: Branch_4_2
>
>
> We running clustered jboss4.0.5 and JBOSS MQ is configured to run in clustered environment.
> The node which was running Jboss MQ went down. JBOSS MQ successfully restarted on second node.But deliver of JMS message failed with error:
> 2006-11-13 11:47:59,130 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] (cludev02) (WorkManager(3)-28:) Unexpected error delivering message SpyTextMessage {
> Header {
> jmsDestination : QUEUE.certione/ExecutorQueue
> jmsDeliveryMode : 2
> jmsExpiration : 0
> jmsPriority : 4
> jmsMessageID : ID:13-116341486898510
> jmsTimeStamp : 1163414868985
> jmsCorrelationID: null
> jmsReplyTo : null
> jmsType : CertioneAsyncProcessingMessage
> jmsRedelivered : false
> jmsProperties : {TrackItemId=738, ExecutorName=certione/PreProcessingProcessRemote, TokenId=19666, AuditRecord=137}
> jmsPropReadWrite: false
> msgReadOnly : true
> producerClientId: ID:13
> }
> Body {
> text :null
> }
> }
> javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000
> at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:106)
> at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
> at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
> at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
> at $Proxy272.onMessage(Unknown Source)
> at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:183)
> at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
> at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
> at org.jboss.mq.SpySession.run(SpySession.java:323)
> at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:249)
> at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
> at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
> at java.lang.Thread.run(Thread.java:595)
> And the most important is that JMS message disappeared after that from database !
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list