Package org.apache.ode.il

Examples of org.apache.ode.il.MockScheduler


        if (Boolean.getBoolean("org.apache.ode.test.persistent")) {
            emf = Persistence.createEntityManagerFactory("ode-unit-test-embedded");
            em = emf.createEntityManager();
            _cf = new BPELDAOConnectionFactoryImpl();
            _server.setDaoConnectionFactory(_cf);
            scheduler = new MockScheduler() {
                @Override
                public void begin() {
                    super.begin();
                    em.getTransaction().begin();
                }

                @Override
                public void commit() {
                    super.commit();
                    em.getTransaction().commit();
                }

                @Override
                public void rollback() {
                    super.rollback();
                    em.getTransaction().rollback();
                }

            };
        } else {
            scheduler = new MockScheduler();
            _cf = new BpelDAOConnectionFactoryImpl(scheduler);
            _server.setDaoConnectionFactory(_cf);
        }
        _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(scheduler));
        _server.setScheduler(scheduler);
View Full Code Here


        MockScheduler _scheduler;
        long                _nextSchedule;

        SchedulerWrapper(BpelServerImpl server, TransactionManager txManager, DataSource dataSource) {
            ExecutorService executorService = Executors.newCachedThreadPool();
            _scheduler = new MockScheduler(_txManager);
            _scheduler.setExecutorSvc(executorService);
            _scheduler.setJobProcessor(server);
        }
View Full Code Here

        if (Boolean.getBoolean("org.apache.ode.test.persistent")) {
            emf = Persistence.createEntityManagerFactory("ode-unit-test-embedded");
            em = emf.createEntityManager();
            _cf = new BPELDAOConnectionFactoryImpl();
            _server.setDaoConnectionFactory(_cf);
            scheduler = new MockScheduler() {
                @Override
                public void begin() {
                    super.begin();
                    em.getTransaction().begin();
                }

                @Override
                public void commit() {
                    super.commit();
                    em.getTransaction().commit();
                }

                @Override
                public void rollback() {
                    super.rollback();
                    em.getTransaction().rollback();
                }

            };
        } else {
            scheduler = new MockScheduler();
            _cf = new BpelDAOConnectionFactoryImpl(scheduler);
            _server.setDaoConnectionFactory(_cf);
        }
        _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(scheduler));
        _server.setScheduler(scheduler);
View Full Code Here

        if (Boolean.getBoolean("org.apache.ode.test.persistent")) {
            emf = Persistence.createEntityManagerFactory("ode-unit-test-embedded");
            em = emf.createEntityManager();
            _cf = new BPELDAOConnectionFactoryImpl();
            _server.setDaoConnectionFactory(_cf);
            scheduler = new MockScheduler() {
                @Override
                public void begin() {
                    super.begin();
                    em.getTransaction().begin();
                }

                @Override
                public void commit() {
                    super.commit();
                    em.getTransaction().commit();
                }

                @Override
                public void rollback() {
                    super.rollback();
                    em.getTransaction().rollback();
                }

            };
        } else {
            scheduler = new MockScheduler();
            _cf = new BpelDAOConnectionFactoryImpl(scheduler);
            _server.setDaoConnectionFactory(_cf);
        }
        _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(scheduler));
        _server.setScheduler(scheduler);
View Full Code Here

        MockScheduler _scheduler;
        long                _nextSchedule;

        SchedulerWrapper(BpelServerImpl server, TransactionManager txManager, DataSource dataSource) {
            ExecutorService executorService = Executors.newCachedThreadPool();
            _scheduler = new MockScheduler(_txManager);
            _scheduler.setExecutorSvc(executorService);
            _scheduler.setJobProcessor(server);
        }
View Full Code Here

        MockScheduler _scheduler;
        long _nextSchedule;

        SchedulerWrapper(BpelServerImpl server, TransactionManager txManager, DataSource dataSource) {
            ExecutorService executorService = Executors.newCachedThreadPool();
            _scheduler = new MockScheduler(_txManager);
            _scheduler.setExecutorSvc(executorService);
            _scheduler.setJobProcessor(server);
        }
View Full Code Here

        if (Boolean.getBoolean("org.apache.ode.test.persistent")) {
            emf = Persistence.createEntityManagerFactory("ode-unit-test-embedded");
            em = emf.createEntityManager();
            _cf = new BPELDAOConnectionFactoryImpl();
            _server.setDaoConnectionFactory(_cf);
            scheduler = new MockScheduler() {
                @Override
                public void begin() {
                    super.begin();
                    em.getTransaction().begin();
                }

                @Override
                public void commit() {
                    super.commit();
                    em.getTransaction().commit();
                }

                @Override
                public void rollback() {
                    super.rollback();
                    em.getTransaction().rollback();
                }

            };
        } else {
            scheduler = new MockScheduler();
            _cf = new BpelDAOConnectionFactoryImpl(scheduler);
            _server.setDaoConnectionFactory(_cf);
        }
        _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(scheduler));
        _server.setScheduler(scheduler);
View Full Code Here

        // We don't want the server to automatically load deployed processes, we'll do that explicitly
        endpointReferenceContext = new OdeEndpointReferenceContext();
        messageExchangeContext = new OdeMessageExchangeContext();
        bindingContext = new OdeBindingContext();

        scheduler = new MockScheduler();
        scheduler.setJobProcessor(server);

        // support setting using core/max pool size
//        ExecutorService executorService = Executors.newCachedThreadPool();
//        SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(), new JdbcDelegate(dataSource), config.getProperties());
View Full Code Here

            throw new RuntimeException("No BPEL server");
        if (_txManager == null)
            throw new RuntimeException("No transaction manager");
        if (_dataSource == null)
            throw new RuntimeException("No data source");
        _scheduler = new MockScheduler(_txManager);
        _scheduler.setJobProcessor(_server);
        return _scheduler;
    }
View Full Code Here

            _txm = new MockTransactionManager();

            BPELDAOConnectionFactoryImpl cf = new BPELDAOConnectionFactoryImpl();
            cf.setTransactionManager(_txm);
            // cf.setDataSource(datasource);
            scheduler = new MockScheduler(_txm);
        } else {
            _txm = new MockTransactionManager();
            scheduler = new MockScheduler(_txm);
            _cf = new BpelDAOConnectionFactoryImpl(_txm);
            _server.setDaoConnectionFactory(_cf);
        }
        _server.setScheduler(scheduler);
        _server.setBindingContext(new BindingContextImpl());
View Full Code Here

TOP

Related Classes of org.apache.ode.il.MockScheduler

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.