Package org.exolab.castor.jdo.conf

Examples of org.exolab.castor.jdo.conf.TransactionManager


       
      if (transactionDemarcation == null)
        throw new TransactionManagerAcquireException ("Problem obtaining transaction manager demarcation configuration");

      String demarcationMode = transactionDemarcation.getMode();
      TransactionManager transactionManager = transactionDemarcation.getTransactionManager();
     
      if (transactionManager == null) {
       
        if (!demarcationMode.equals(LocalTransactionManagerFactory.NAME))
          throw new TransactionManagerAcquireException ("Problem obtaining required transaction manager configuration.");
       
      } else {
       
        String mode = transactionManager.getName();
        if (mode == null)
          throw new TransactionManagerAcquireException ("Attribute MODE for <transaction-manager> required");
     
        TransactionManagerFactory factory = getTransactionManagerFactory(mode);
        if (factory == null)
          throw new TransactionManagerAcquireException ("Invalid value for MODE. Transaction manager factory with MODE = " +
            mode + "does not exist");

        Properties properties = new Properties();
         
        Enumeration parameters = transactionManager.enumerateParam();
        while (parameters.hasMoreElements()) {
          Param param = (Param) parameters.nextElement();
          properties.put(param.getName(), param.getValue());
        }
     
View Full Code Here


  public static TransactionDemarcation createSimpleTransactionDemarcationConf()
  {
    TransactionDemarcation trans = new TransactionDemarcation();

    trans.setMode("local");
    trans.setTransactionManager(new TransactionManager());

    return trans;
  }
View Full Code Here

TOP

Related Classes of org.exolab.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.