Examples of scheduleWork()


Examples of com.sun.ejb.spi.container.ContainerService.scheduleWork()

      try {
    ContainerService service = ContainerFactoryImpl.getContainerService();

    //scheduleWork performs the task on the same thread
    //  if it cannot schedule the task for async execution
    service.scheduleWork(super.getClassLoader(), task);
      } catch (Throwable th) {
    //We would be here only if containerService is null

    _logger.log(Level.FINE, storeManagerName
      + ": Cannot execute file removal aynchronously", th);
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

   {
      JmsActivation activation = pool.getActivation();
      WorkManager workManager = activation.getWorkManager();
      try
      {
         workManager.scheduleWork(this, 0, null, this);
      } catch (WorkException e)
      {
         log.error("Unable to schedule work", e);
         throw new JMSException("Unable to schedule work: " + e.toString());
      }
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

      this.ctx = ctx;
      WorkManager mgr = ctx.getWorkManager();
      newMsgsWorker = new NewMsgsWorker(mgr);
      try
      {
         mgr.scheduleWork(newMsgsWorker);
      }
      catch (WorkException e)
      {
         throw new ResourceAdapterInternalException(e);
      }
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

    SynchronizedBoolean flag = new SynchronizedBoolean(false);
    Object lock = new Object();

    public void testWorkManager() throws Exception {
        WorkManager workManager = (WorkManager) getBean("workManager");
        workManager.scheduleWork(new Work() {
            public void release() {
            }

            public void run() {
                flag.set(true);
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

   {
      JmsActivation activation = pool.getActivation();
      WorkManager workManager = activation.getWorkManager();
      try
      {
         workManager.scheduleWork(this, 0, null, this);
      } catch (WorkException e)
      {
         log.error("Unable to schedule work", e);
         throw new JMSException("Unable to schedule work: " + e.toString());
      }
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

      this.ctx = ctx;
      WorkManager mgr = ctx.getWorkManager();
      newMsgsWorker = new NewMsgsWorker(mgr);
      try
      {
         mgr.scheduleWork(newMsgsWorker);
      }
      catch (WorkException e)
      {
         throw new ResourceAdapterInternalException(e);
      }
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

    public void start() throws JMSException {
        JmsActivation activation = pool.getActivation();
        WorkManager workManager = activation.getWorkManager();
        try {
            workManager.scheduleWork(this, 0, null, this);
        } catch (WorkException e) {
            log.error("Unable to schedule work", e);
            throw new JMSException("Unable to schedule work: " + e.toString());
        }
    }
View Full Code Here

Examples of javax.resource.spi.work.WorkManager.scheduleWork()

/*     */   {
/* 207 */     JmsActivation activation = this.pool.getActivation();
/* 208 */     WorkManager workManager = activation.getWorkManager();
/*     */     try
/*     */     {
/* 211 */       workManager.scheduleWork(this, 0L, null, this);
/*     */     }
/*     */     catch (WorkException e) {
/* 214 */       log.error("Unable to schedule work", e);
/* 215 */       throw new JMSException("Unable to schedule work: " + e.toString());
/*     */     }
View Full Code Here

Examples of org.apache.geronimo.connector.work.GeronimoWorkManager.scheduleWork()

        } else {
            GeronimoWorkManager wm = createWorkManager(30);
            int nb = Integer.parseInt(args[0]);
            latch = new CountDownLatch(nb);
            for (int i = 0; i < nb; i++) {
                wm.scheduleWork(new JMSClient());
            }
            latch.await();
            wm.doStop();
        }
        System.out.println("Closing.");
View Full Code Here

Examples of org.apache.geronimo.connector.work.GeronimoWorkManager.scheduleWork()

                th = Integer.parseInt(args[1]);
            }
            GeronimoWorkManager wm = createWorkManager(th);
            latch = new CountDownLatch(nb);
            for (int i = 0; i < nb; i++) {
                wm.scheduleWork(new JMSClient());
            }
            latch.await();
            wm.doStop();
        }
        System.out.println("Closing.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.