git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@480717 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-11-29 21:26:23 +00:00
parent 346119bfc4
commit 789d4e5541
1 changed files with 6 additions and 5 deletions

View File

@ -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();
}
}