Package org.apache.ode.daohib

Examples of org.apache.ode.daohib.SessionManager


        if (System.getProperty("ode.connection.isolation") != null) {
            String level = System.getProperty("ode.connection.isolation", "2");
            properties.put(Environment.ISOLATION, level);
        }       

        SessionManager sm = new SessionManager(properties, _ds, _tm);
        _sessionManager = sm;
    }
View Full Code Here


        if (System.getProperty("ode.connection.isolation") != null) {
            String level = System.getProperty("ode.connection.isolation", "2");
            properties.put(Environment.ISOLATION, level);
        }       

        SessionManager sm = new SessionManager(properties, _ds, _tm);
        _sessionManager = sm;
    }
View Full Code Here

        }
        _sessionManager = createSessionManager(properties, _ds, _tm);
    }

    protected SessionManager createSessionManager(Properties properties, DataSource ds, TransactionManager tm) {
        return new SessionManager(properties, ds, tm);
    }
View Full Code Here

    public void test() throws Exception {
        MessageExchangeDAO mex = daoConn.createMessageExchange('M');
        mex.lockPremieMessages();
       
        SessionManager sm = ((BpelDAOConnectionImpl) daoConn)._sm;
        HCorrelator correlator = new HCorrelator();
        correlator.setCorrelatorId("abc");
        sm.getSession().save(correlator);
        new CorrelatorDaoImpl(sm, correlator).dequeueMessage(new CorrelationKeySet("@2[12~a~b]"));
    }
View Full Code Here

        if (System.getProperty("ode.connection.isolation") != null) {
            String level = System.getProperty("ode.connection.isolation", "2");
            properties.put(Environment.ISOLATION, level);
        }       

        SessionManager sm = new SessionManager(properties, _ds, _tm);
        _sessionManager = sm;
    }
View Full Code Here

            while (names.hasMoreElements()) {
                String name = (String) names.nextElement();
                __log.debug(name + "=" + properties.getProperty(name));
            }
        }
        SessionManager sm = new SessionManager(properties, _ds, _tm);
        _sessionManager = sm;
    }
View Full Code Here

    private static ProcessInstanceDaoImpl instance;
    private static ProcessDaoImpl process;

    @Override
    protected SessionManager createSessionManager(Properties properties, DataSource ds, TransactionManager tm) {
        _staticSessionManager = new SessionManager(properties, ds, tm) {
            @Override
            public Configuration getDefaultConfiguration() throws MappingException {
                Configuration conf = super.getDefaultConfiguration();
                conf.setListener("post-insert", HibDaoConnectionFactoryImpl.this);
                return conf;
View Full Code Here

        }
        _sessionManager = createSessionManager(properties, _ds, _tm);
    }

    protected SessionManager createSessionManager(Properties properties, DataSource ds, TransactionManager tm) {
        return new SessionManager(properties, ds, tm);
    }
View Full Code Here

    public void test() throws Exception {
        MessageExchangeDAO mex = daoConn.createMessageExchange('M');
        mex.lockPremieMessages();
       
        SessionManager sm = ((BpelDAOConnectionImpl) daoConn)._sm;
        HCorrelator correlator = new HCorrelator();
        correlator.setCorrelatorId("abc");
        sm.getSession().save(correlator);
        new CorrelatorDaoImpl(sm, correlator).dequeueMessage(new CorrelationKeySet("@2[12~a~b]"));
    }
View Full Code Here

        sm.getSession().save(correlator);
        new CorrelatorDaoImpl(sm, correlator).dequeueMessage(new CorrelationKeySet("@2[12~a~b]"));
    }
   
    public void testCleanup() throws Exception {
        SessionManager sm = ((BpelDAOConnectionImpl) daoConn)._sm;
        ProcessDAO p = daoConn.createProcess(QName.valueOf("abc"), QName.valueOf("abc"), "abc", 1);
        CorrelatorDAO correlator = p.addCorrelator("abc");
        ProcessInstanceDAO instance = p.createInstance(correlator);

        MessageExchangeDAO mex = daoConn.createMessageExchange('M');
        mex.setProperty("abc", "def");
        mex.setInstance(instance);

        txm.commit();
        txm.begin();
        assertEquals(1, sm.getSession().createSQLQuery("select count(*) from BPEL_MEX_PROPS").list().get(0));
       
        Set<CLEANUP_CATEGORY> cleanupCategories = EnumSet.allOf(CLEANUP_CATEGORY.class);
        instance.delete(cleanupCategories);
        txm.commit();
        txm.begin();

        assertEquals(0, sm.getSession().createSQLQuery("select count(*) from BPEL_MEX_PROPS").list().get(0));
    }
View Full Code Here

TOP

Related Classes of org.apache.ode.daohib.SessionManager

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.