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

Sree Panchajanyam D edited comment on AMQ-3460 at 11/6/13 5:10 PM:
-------------------------------------------------------------------

*****************************************
Code Location of the Issue and Fix
*****************************************
This issue has got something to do with 
org.apache.activemq.ActiveMQConnection.java not checking if the connection is 
started or not before creating JMSSession is created.

Method:
 public Session createSession(boolean transacted, int acknowledgeMode) throws 
JMSException {

//Fix is to check if connection is started or not before creating a session :
synchronized(this.startMutex){
                if(!this.isStarted()) {
                        start();
                }
        }

  checkClosedOrFailed();
        ensureConnectionInfoSent();
        LOG.trace("Connection started : " + isStarted() + "Connection Hash Code 
: "+ this.hashCode() +"Connection Details: " + this );

// rest of the code
// goes here

}


was (Author: sreepanchajanyam):
*****************************************
Code Location of the Issue and Fix
*****************************************
This issue has got something to do with 
org.apache.activemq.ActiveMQConnection.java not checking if the connection is 
started or not before creating JMSSession is created.

Method:
 public Session createSession(boolean transacted, int acknowledgeMode) throws 
JMSException

Fix is to check if connection is started or not before creating a session :
synchronized(this.startMutex){
                if(!this.isStarted()) {
                        start();
                }
        }

  checkClosedOrFailed();
        ensureConnectionInfoSent();
        LOG.trace("Connection started : " + isStarted() + "Connection Hash Code 
: "+ this.hashCode() +"Connection Details: " + this );



> Messages get stuck in the queue for some client sessions, "Dispatched Queue" 
> grows but "Dequeues" doesn't move
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3460
>                 URL: https://issues.apache.org/jira/browse/AMQ-3460
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.1
>         Environment: java version "1.5.0_15"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)
>            Reporter: Timur Evdokimov
>            Priority: Critical
>             Fix For: AGING_TO_DIE
>
>         Attachments: acmq01.png, acmq02.png
>
>
> We experience the following problem.
> There's 1 sender thread and 20 listener threads operating on the same queue.
> No other queues are involved.
> Message traffic goes generally OK via the queue, however Number of pending 
> messages goes up one by one.
> Looking at the active customers list, the following appears (see attached 
> screenshot).
> For all sessions but two, the messages are dispatched properly.
> For these two affected sessions, the "Dispatched Queue" value gots stuck at 
> certain moment and doesn't deliver anymore.
> Eventually, more sessions got affected, and maybe after some hours, the stuck 
> messages got delivered.
> What we tried - adding useCache="false" into <policyEntry queue=">" ... > 
> tag. Didn't have any effect.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to