Examples of WorkManager


Examples of javax.resource.spi.work.WorkManager

            } else {
                threadPool = Executors.newFixedThreadPool(threadPoolSize, new ResourceAdapterThreadFactory(serviceInfo.id));
            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            WorkManager workManager;
            if (transactionManager instanceof GeronimoTransactionManager) {
                GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, geronimoTransactionManager);
            } else {
                workManager = new SimpleWorkManager(threadPool);
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

    long txGenerator = System.currentTimeMillis();

    private static final class StubBootstrapContext implements BootstrapContext {
        public WorkManager getWorkManager() {
            return new WorkManager() {
                public void doWork(Work work) throws WorkException {
                    new Thread(work).start();
                }

                public void doWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

            int threadPoolSize = getIntProperty(serviceInfo.properties, "threadPoolSize", 30);
            if (threadPoolSize <= 0) throw new IllegalArgumentException("threadPoolSizes <= 0: " + threadPoolSize);
            Executor threadPool = Executors.newFixedThreadPool(threadPoolSize, new ResourceAdapterThreadFactory(serviceInfo.id));

            // create a work manager which the resource adapter can use to dispatch messages or perform tasks
            WorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, geronimoTransactionManager);

            // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
            BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, geronimoTransactionManager);

            // start the resource adapter
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

        // create a thead pool for ActiveMQ
        Executor threadPool = Executors.newFixedThreadPool(30);

        // create a work manager which ActiveMQ uses to dispatch message delivery jobs
        WorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, transactionManager);

        // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
        BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, transactionManager);

        // start the resource adapter
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

        // create a thead pool for ActiveMQ
        Executor threadPool = Executors.newFixedThreadPool(30);

        // create a work manager which ActiveMQ uses to dispatch message delivery jobs
        WorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, transactionManager);

        // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
        BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, transactionManager);

        // start the resource adapter
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

        // create a thead pool for ActiveMQ
        Executor threadPool = Executors.newFixedThreadPool(30);

        // create a work manager which ActiveMQ uses to dispatch message delivery jobs
        WorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, transactionManager);

        // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
        BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, transactionManager);

        // start the resource adapter
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

        // create a thead pool for ActiveMQ
        Executor threadPool = Executors.newFixedThreadPool(30);

        // create a work manager which ActiveMQ uses to dispatch message delivery jobs
        WorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, transactionManager);

        // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
        BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, transactionManager);

        // start the resource adapter
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

                    .build(new Options(serviceInfo.properties, SystemInstance.get().getOptions()));
                logger.info("Thread pool size for '" + serviceInfo.id + "' is (" + threadPoolSize + ")");
            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            final WorkManager workManager;
            if (GeronimoTransactionManager.class.isInstance(transactionManager)) {
                final GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                final TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(geronimoTransactionManager);

                // use id as default realm name if realm is not specified in service properties
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

            } else {
                threadPool = Executors.newFixedThreadPool(threadPoolSize, new ResourceAdapterThreadFactory(serviceInfo.id));
            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            WorkManager workManager;
            if (transactionManager instanceof GeronimoTransactionManager) {
                GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(geronimoTransactionManager);
               
                // use id as default realm name if realm is not specified in service properties
View Full Code Here

Examples of javax.resource.spi.work.WorkManager

    throws ResourceAdapterInternalException
  {
    try {
      log.info("WorkResource[] starting");

      WorkManager workManager = ctx.getWorkManager();
   
      Work work = new WorkTask(this);

      TimerTask timerTask = new WorkScheduleTimerTask(workManager, work);
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.