Package org.castor.jdo.conf

Examples of org.castor.jdo.conf.TransactionManager


     * @param props Properties to be used for the transaction manager.
     * @return TransactionDemarcation configuration with global transaction handling.
     */
    public static TransactionDemarcation createGlobalTransactionDemarcation(
            final String name, final Properties props) {
        TransactionManager manager = new TransactionManager();
        manager.setName(name);

        Iterator iter = props.entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry entry = (Map.Entry) iter.next();
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
           
            manager.addParam(createParam(key, value));
        }
       
        TransactionDemarcation trans = new TransactionDemarcation();
        trans.setMode("global");
        trans.setTransactionManager(manager);
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.TransactionManager

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.