[ 
https://issues.apache.org/jira/browse/QPIDJMS-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112910#comment-16112910
 ] 

Robbie Gemmell commented on QPIDJMS-307:
----------------------------------------

There are a variety of bugs and behaviours in play here.

The router is accepting the clients transaction coordination link, whereas it 
should actually refuse it if it knows it hasnt been link-routed somewhere, 
since it doesnt coordinate transactions itself, ergo no reason to accept the 
link. I've raised DISPATCH-802 for this.

In 0.7.0 Dispatch would grant credit to senders for an address even if it knew 
there were no receivers for it. This would allow the client to actually try and 
declare a transaction. The router presumably rejected that declare. The client 
mishandled the rejection, giving you the exception you saw.

In 0.8.0 the router does not grant credit to senders on adddresses it knows 
have no receivers. It still erroneously accepts the coordinator link, but it 
doesnt give any credit, so the client doesnt get as far as sending its 
transaction declare, and so doesnt get the rejection back, and doesnt fall over 
it. If you add something like "?jms.requestTimeout=10000" to your URI the 
client will time out waiting on its declare for the transaction and throw 
against 0.8.0.

> fix handling of failure to create transacted session when running against 
> Dispatch
> ----------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-307
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-307
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.23.0
>            Reporter: Robbie Gemmell
>
> The client doesnt currently handle the failure to create a transacted session 
> when running against Dispatch, NPE'ing in the process giving the exception 
> below rather than a more helpful exception, as detailed at 
> https://lists.apache.org/thread.html/b81df836d2bd11801f1aaf5e835de19ac14d10a0e5b14f64f5aa663c@%3Cusers.qpid.apache.org%3E
> {noformat}
> javax.jms.JMSException: java.lang.NullPointerException
> at
> org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:86)
> at
> org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:108)
> at org.apache.qpid.jms.JmsConnection.createResource(JmsConnection.java:609)
> at
> org.apache.qpid.jms.JmsLocalTransactionContext.begin(JmsLocalTransactionContext.java:125)
> at org.apache.qpid.jms.JmsSession.<init>(JmsSession.java:143)
> at org.apache.qpid.jms.JmsConnection.createSession(JmsConnection.java:299)
> at org.myorg.mymessaging.PostOffice.buildSession(PostOffice.java:149)
> ...
> Caused by: java.io.IOException: java.lang.NullPointerException
> at
> org.apache.qpid.jms.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
> at
> org.apache.qpid.jms.provider.amqp.AmqpTransactionCoordinator.processDeliveryUpdates(AmqpTransactionCoordinator.java:117)
> at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:928)
> at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1800(AmqpProvider.java:93)
> at
> org.apache.qpid.jms.provider.amqp.AmqpProvider$18.run(AmqpProvider.java:790)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
> at
> org.apache.qpid.jms.provider.amqp.AmqpTransactionCoordinator.processDeliveryUpdates(AmqpTransactionCoordinator.java:93)
> ... 10 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to