jbertram commented on PR #5207:
URL: 
https://github.com/apache/activemq-artemis/pull/5207#issuecomment-2329906926

   > ...when the NPE occurs the consequence is some other exception with 
message « Cannot add a producer to a connection that had not been registered » 
; the error is not transmitted correctly to the client and the client retries 
to use the same connection again and again.
   
   In what sense is the error "not transmitted correctly to the client"? When I 
modify the broker to reproduce an equivalent `NullPointerException` when 
calling `createSession` the subsequent call to `createProducer` fails with a 
`javax.jms.IllegalStateException` which seems appropriate. Might the 
`PooledConnectionFactory` or perhaps the application using the pool have a bug 
where it's not interpreting this exception properly? Such an exception when 
invoking `createProducer` indicates an "internal error" so the safest thing 
would be to destroy the corresponding `Session` and `Connection` and re-create 
them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to