mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@480717 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
346119bfc4
commit
789d4e5541
|
@ -63,8 +63,11 @@ public class ActiveMQSessionExecutor implements Task {
|
|||
|
||||
public void wakeup() {
|
||||
if( !dispatchedBySessionPool ) {
|
||||
if( taskRunner!=null ) {
|
||||
if( session.isSessionAsyncDispatch() ) {
|
||||
try {
|
||||
if( taskRunner == null ) {
|
||||
taskRunner = session.connection.getSessionTaskRunner().createTaskRunner(this, "ActiveMQ Session: "+session.getSessionId());
|
||||
}
|
||||
taskRunner.wakeup();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
|
@ -101,10 +104,8 @@ public class ActiveMQSessionExecutor implements Task {
|
|||
synchronized void start() {
|
||||
if( !messageQueue.isRunning() ) {
|
||||
messageQueue.start();
|
||||
if( session.isSessionAsyncDispatch() || dispatchedBySessionPool ) {
|
||||
taskRunner = session.connection.getSessionTaskRunner().createTaskRunner(this, "ActiveMQ Session: "+session.getSessionId());
|
||||
}
|
||||
wakeup();
|
||||
if( hasUncomsumedMessages() )
|
||||
wakeup();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue