Package org.apache.geronimo.connector.work

Examples of org.apache.geronimo.connector.work.GeronimoWorkManager


        tcmfb.afterPropertiesSet();
        WorkManagerFactoryBean wmfb = new WorkManagerFactoryBean();
        wmfb.setTransactionContextManager((TransactionContextManager) tcmfb.getObject());
        wmfb.setThreadPoolSize(poolSize);
        wmfb.afterPropertiesSet();
        GeronimoWorkManager wm = wmfb.getWorkManager();
        return wm;
    }
View Full Code Here


        return null;
    }

    public boolean isContextSupported(Class<? extends WorkContext> cls) {
        if (workManager instanceof GeronimoWorkManager) {
          GeronimoWorkManager geronimoWorkManager = (GeronimoWorkManager) workManager;
          return geronimoWorkManager.isContextSupported(cls);
        }
       
        return false;
    }
View Full Code Here

                Collection<WorkContextHandler> workContextHandlers = new ArrayList<WorkContextHandler>();
                workContextHandlers.add(txWorkContextHandler);
                workContextHandlers.add(securityContextHandler);
                workContextHandlers.add(hintsContextHandler);
               
                workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, workContextHandlers);
            } else {
                workManager = new SimpleWorkManager(threadPool);
            }

View Full Code Here

            // 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

    protected TransactionContextManager createTransactionContextManager() throws XAException {
        return new TransactionContextManager(getTransactionManager(), getXidImporter());
    }

    protected GeronimoWorkManager createWorkManager() throws XAException {
        return new GeronimoWorkManager(getThreadPoolSize(), getTransactionContextManager());
    }
View Full Code Here

        final ExtendedTransactionManager etm = tm;
        XidImporter xidImporter = tm;
        TransactionContextManager manager = new TransactionContextManager(etm, xidImporter);

        GeronimoWorkManager workManager = new GeronimoWorkManager(1000, manager);
        workManager.doStart();

        ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter();
        ra.setServerUrl("vm://localhost");

        ResourceAdapterWrapper raWrapper = new ResourceAdapterWrapper(ra, workManager);
View Full Code Here

    this.transactionContextManager = transactionContextManager;
  }

  public BootstrapContext getBootstrapContext() {
    if (bootstrapContext == null) {
        GeronimoWorkManager wm = (GeronimoWorkManager) broker.getContainer().getWorkManager();
        bootstrapContext = new BootstrapContextImpl(wm);
    }
    return bootstrapContext;
  }
View Full Code Here

            int nb = Integer.parseInt(args[0]);
            int th = 30;
            if (args.length > 1) {
                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.");
        requestor.close();
    }
View Full Code Here

        tcmfb.afterPropertiesSet();
        WorkManagerFactoryBean wmfb = new WorkManagerFactoryBean();
        wmfb.setTransactionContextManager((TransactionContextManager) tcmfb.getObject());
        wmfb.setThreadPoolSize(poolSize);
        wmfb.afterPropertiesSet();
        GeronimoWorkManager wm = wmfb.getWorkManager();
        return wm;
    }
View Full Code Here

                Collection<WorkContextHandler> workContextHandlers = new ArrayList<WorkContextHandler>();
                workContextHandlers.add(txWorkContextHandler);
                workContextHandlers.add(securityContextHandler);
                workContextHandlers.add(hintsContextHandler);
               
                workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, workContextHandlers);
            } else {
                workManager = new SimpleWorkManager(threadPool);
            }

View Full Code Here

TOP

Related Classes of org.apache.geronimo.connector.work.GeronimoWorkManager

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.