Package org.jboss.messaging.util

Examples of org.jboss.messaging.util.Future


         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();
     
      try
      {
         sessionExecutor.execute(new Closer(result));

         if (trace) { log.trace(this + " blocking wait for Closer execution"); }
         result.getResult();
         if (trace) { log.trace(this + " got Closer result"); }
      }
      catch (InterruptedException e)
      {
         log.warn("Thread interrupted", e);
View Full Code Here


      return true;
   }
       
   public int getRefCount()
   {
      Future result = new Future();
     
      //This needs to be run on a different thread to the one used by JGroups to deliver the message
      //to avoid deadlock
      try
      {
         this.executor.execute(new GetRefCountRunnable(result));
      }
      catch (InterruptedException e)
      {
         log.warn("Thread interrupted", e);
      }

      return ((Integer)result.getResult()).intValue();
   }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();

      sessionExecutor.execute(new Closer(result));

      if (trace) { log.trace(this + " blocking wait for Closer execution"); }
      result.getResult();
      if (trace) { log.trace(this + " got Closer result"); }
   }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();

      sessionExecutor.execute(new Closer(result));

      if (trace) { log.trace(this + " blocking wait for Closer execution"); }
      result.getResult();
      if (trace) { log.trace(this + " got Closer result"); }
   }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();
     
      try
      {
         sessionExecutor.execute(new Closer(result));

         if (trace) { log.trace(this + " blocking wait for Closer execution"); }
         result.getResult();
         if (trace) { log.trace(this + " got Closer result"); }
      }
      catch (InterruptedException e)
      {        
      }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();
     
      try
      {
         sessionExecutor.execute(new Closer(result));

         if (trace) { log.trace(this + " blocking wait for Closer execution"); }
         result.getResult();
         if (trace) { log.trace(this + " got Closer result"); }
      }
      catch (InterruptedException e)
      {        
      }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();

      sessionExecutor.execute(new Closer(result));

      if (trace) { log.trace(this + " blocking wait for Closer execution"); }
      result.getResult();
      if (trace) { log.trace(this + " got Closer result"); }
   }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();

      Closer closer = new Closer(result);
      sessionExecutor.execute(closer);

      //https://issues.jboss.org/browse/JBMESSAGING-1883
      if (closer.getState() == StatefulRunnable.NORMAL)
      {
         if (trace) { log.trace(this + " blocking wait for Closer execution"); }
         result.getResult();
      }
      else
      {
         if (trace) { log.trace(this + " won't wait for Closer as the executor is closed already"); }
      }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();

      sessionExecutor.execute(new Closer(result));

      if (trace) { log.trace(this + " blocking wait for Closer execution"); }
      result.getResult();
      if (trace) { log.trace(this + " got Closer result"); }
   }
View Full Code Here

         // session is closed from within the MessageListener.onMessage(), for example), so no need
         // to register another Closer (see http://jira.jboss.org/jira/browse/JBMESSAGING-542)
         return;
      }

      Future result = new Future();
     
      try
      {
         sessionExecutor.execute(new Closer(result));

         if (trace) { log.trace(this + " blocking wait for Closer execution"); }
         result.getResult();
         if (trace) { log.trace(this + " got Closer result"); }
      }
      catch (InterruptedException e)
      {        
      }
View Full Code Here

TOP

Related Classes of org.jboss.messaging.util.Future

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.