mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/branches/activemq-4.1@480862 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11266b8df4
commit
5bb32abe03
|
@ -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