Package org.castor.jdo.conf

Examples of org.castor.jdo.conf.TransactionDemarcation


     * Create a transaction demarcation configuration with local transaction handling.
     *
     * @return TransactionDemarcation configuration with local transaction handling.
     */
    public static TransactionDemarcation createLocalTransactionDemarcation() {
        TransactionDemarcation trans = new TransactionDemarcation();
        trans.setMode("local");
        return trans;
    }
View Full Code Here


            String value = (String) entry.getValue();
           
            manager.addParam(createParam(key, value));
        }
       
        TransactionDemarcation trans = new TransactionDemarcation();
        trans.setMode("global");
        trans.setTransactionManager(manager);
        return trans;
    }
View Full Code Here

    public String getName() {
        return _jdoConf.getName();
    }
   
    public String getTransactionManager() throws MappingException {
        TransactionDemarcation demarcation = _jdoConf.getTransactionDemarcation();
        if (LocalTransactionManagerFactory.NAME.equals(demarcation.getMode())) {
            return LocalTransactionManagerFactory.NAME;
        } else if (demarcation.getTransactionManager() != null) {
            return demarcation.getTransactionManager().getName();
        } else {
            String msg = "Missing configuration of TransactionManager.";
            LOG.error(msg);
            throw new MappingException(msg);
        }
View Full Code Here

        }
    }

    public Properties getTransactionManagerParameters() {
        Properties properties = new Properties();
        TransactionDemarcation demarcation = _jdoConf.getTransactionDemarcation();
        TransactionManager manager = demarcation.getTransactionManager();
        if (manager != null) {
            Enumeration parameters = manager.enumerateParam();
            while (parameters.hasMoreElements()) {
                Param param = (Param) parameters.nextElement();
                properties.put(param.getName(), param.getValue());
View Full Code Here

TOP

Related Classes of org.castor.jdo.conf.TransactionDemarcation

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.