[
https://issues.apache.org/jira/browse/SYNAPSE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630928#action_12630928
]
Andreas Veithen commented on SYNAPSE-448:
-----------------------------------------
Actually, if connection is null, this means JMSSender uses a cached session and
the underlying connection is already started. Therefore it is sufficient to add
a simple if statement to fix this issue. I corrected this in the trunk but I
believe there is also some resource leak in the case we are discussing here, so
you are invited to test the solution, but I discourage you from using it in a
production environment. Anyway I will keep this JIRA issue open until I have
written a regression test.
> NullPointerException in JMSSender when JMS config details defined in axis2.xml
> ------------------------------------------------------------------------------
>
> Key: SYNAPSE-448
> URL: https://issues.apache.org/jira/browse/SYNAPSE-448
> Project: Synapse
> Issue Type: Bug
> Components: Transports
> Affects Versions: 1.2
> Environment: Any
> Reporter: Jason Royals
>
> I am proxying a JMS service over HTTP. The JMS service responds with some
> XML, so the JMSSender expects a reply. To make my endpoint more reusable,
> I'm putting the JMS connection details in axis2.xml (as detailed in
> SYNAPSE-183). What's actually happening though is that the HTTP client is
> just timing out. I ran the debugger over Synapse to see what was going on,
> and it looks like a defect with the implementation of that feature.
> To listen for a JMS reply from the endpoint, Synapse starts a connection
> (JMSSender:267) after sending the message. However, this connection is only
> ever initialised if the JMS connection is _not_ defined in axis2.xml, due to
> the if/else that checks for an already established connectionFactory at the
> key "transport.jms.ConnectionFactory" (JMSSender:119). This means the
> connection is always null when using this feature, and a NPE will be thrown
> at line 267.
> I'll supply a test if required.
> Cheers,
> Jason
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]