axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiranya Jayathilaka (JIRA)" <>
Subject [jira] [Updated] (AXIS2-5524) JMSSender should not use a shared session or producer
Date Fri, 03 Jul 2015 05:17:04 GMT


Hiranya Jayathilaka updated AXIS2-5524:
    Attachment: AXIS2-5524.patch

Attaching patch. 

The fix I've implemented is to get rid of the state variables sharedSession and sharedProducer
in the JMSConnectionFactory class. This way, the transport will always create a new session
and a producer for each outgoing message. The sharedConnection has been retained since JMS
spec allows sharing the connections among threads.

> JMSSender should not use a shared session or producer
> -----------------------------------------------------
>                 Key: AXIS2-5524
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: JMS transport
>            Reporter: Andreas Veithen
>            Priority: Critical
>             Fix For: 1.7.0
>         Attachments: AXIS2-5524.patch
> Depending on the cache level, the JMSConnectionFactory stores a "shared" session and/or
message producer. These objects are used by the JMSSender (via JMSMessageSender). Since sessions
and producers are not thread safe, this will lead to concurrency issues. Note that initially
the JMSListener used a similar pattern. This has been corrected [1], but the issue has never
been addressed for the JMSSender. The concept of "shared" session/producer should be eliminated
altogether from JMSConnectionFactory.
> [1]

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message