[jboss-user] [JBoss Messaging] - Re: Queue MaxSize Not Obeyed When Using Transacted Sessions

vishalrao do-not-reply at jboss.com
Mon Jul 7 12:10:02 EDT 2008


"ataylor" wrote : You'll probably find you aren't committing your transaction, add a session.commit() and you'll see the exception thrown. 

Hi Andy,

Thanks for the response.  

I am doing a session.commit() and I am seeing the output that shows this
in my code:


  | 
  |            // Start sending messages
  |             sendLoop(session, producer);
  | 
  |             if (transacted)
  |             {
  |                 System.err.println("About to commit the session.");
  |                 session.commit();
  |                 System.err.println("Finished commiting the session.");
  |             }
  |             System.out.println("Done.");
  | 
  | 
  | 
  | 


Here's the interesting thing:

With 0 messages in the queue and MaxSize=20, the transaction
of 200 messages is allowed to commit:



  | 
  | ...
  | ...
  | Sending message: 188
  | Sending message: 189
  | Sending message: 190
  | Sending message: 191
  | Sending message: 192
  | Sending message: 193
  | Sending message: 194
  | Sending message: 195
  | Sending message: 196
  | Sending message: 197
  | Sending message: 198
  | Sending message: 199
  | About to commit the session.
  | Finished commiting the session.
  | Done.
  | 
  | We have reached the finally block.
  | About to close JMS connection.
  | Finished closing the JMS connection.
  | 
  | 

With 200 messages in the queue and MaxSize=20, the transaction
of 200 messags is NOT allowed to commit:


  | 
  | 
  | ...
  | ...
  | ...
  | Sending message: 199
  | About to commit the session.
  | Caught: org.jboss.jms.exception.MessagingTransactionRolledBackException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
  | org.jboss.jms.exception.MessagingTransactionRolledBackException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
  |         at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:228)
  |         at org.jboss.jms.client.container.SessionAspect.handleCommit(SessionAspect.java:557)
  |         at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect26.invoke(SessionAspect26.java)
  |         at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
  |         at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
  |         at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
  |         at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
  |         at org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
  |         at org.jboss.jms.client.JBossSession.commit(JBossSession.java:164)
  |         at ProducerJBM.run(ProducerJBM.java:122)
  |         at ProducerJBM.main(ProducerJBM.java:42)
  | Caused by: javax.jms.JMSException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
  |         at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:743)
  |         at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.processTransaction(ServerConnectionEndpoint.java:792)
  | 
  | 
  | 

I'm wondering if the first case here is a bug or a feature.

Thanks,
Vishal

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

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



More information about the jboss-user mailing list