Examples of TransactionManager


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

Examples of org.fto.jthink.transaction.TransactionManager

    ResourceManager resManager = new ResourceManager();
    /* 将配置文件加入到资源管理器中 */
    resManager.setResource(Configuration.class.getName(), config);
   
    /* 初始化事务管理器 */
    TransactionManager transactionManager = new DefaultTransactionManager(resManager, config);
    /* 将事务管理器加入到资源管理器中 */
    resManager.setResource(TransactionManager.class.getName(), transactionManager);
   
    /* 返回在fto-jthink.xml中配置的JDBC事务 */
    TransactionFactory transactionFactory = transactionManager.getTransactionFactory("SampleTransaction");
    JDBCTransaction transaction  = (JDBCTransaction)transactionFactory.create();
    /* 将此事务处理对象加入到事务管理器中 */
    transactionManager.addTransaction(JDBCTransaction.class.getName(), transaction);
    resManager.setResource(JDBCTransaction.class.getName(), transaction);
   
    return resManager;
  }
View Full Code Here

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.transaction.TransactionManager

        String type = attributes.getProperty("type");
        boolean commitRequired = "true".equals(attributes.getProperty("commitRequired"));

        state.getConfig().getErrorContext().setActivity("configuring the transaction manager");
        type = state.getConfig().getTypeHandlerFactory().resolveAlias(type);
        TransactionManager txManager;
        try {
          state.getConfig().getErrorContext().setMoreInfo("Check the transaction manager type or class.");
          TransactionConfig config = (TransactionConfig) Resources.instantiate(type);
          config.setDataSource(state.getDataSource());
          state.getConfig().getErrorContext()
              .setMoreInfo("Check the transactio nmanager properties or configuration.");
          config.setProperties(state.getTxProps());
          config.setForceCommit(commitRequired);
          config.setDataSource(state.getDataSource());
          state.getConfig().getErrorContext().setMoreInfo(null);
          txManager = new TransactionManager(config);
        } catch (Exception e) {
          if (e instanceof SqlMapException) {
            throw (SqlMapException) e;
          } else {
            throw new SqlMapException(
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.tx.model.TransactionManager

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse dmrResponse) {
                ModelNode response = dmrResponse.get();
                TransactionManager transactionManager = entityAdapter.fromDMR(response.get(RESULT));
                getView().setTransactionManager(transactionManager);
            }
        });

    }
View Full Code Here

Examples of org.jpos.transaction.TransactionManager

import javax.swing.*;

public class TMMonitorFactory implements UIFactory {
    public JComponent create(UI ui, Element e) {
        try {
            TransactionManager tm =
                (TransactionManager) NameRegistrar.get (e.getAttributeValue ("transaction-manager"));
            return new TMMonitor (ui, tm);
        } catch (NameRegistrar.NotFoundException ex) {
            return new JTextArea (ex.toString());
        }
View Full Code Here

Examples of org.jpox.transaction.TransactionManager

        apiAdapter = ApiAdapterFactory.getInstance().getApiAdapter(apiName);

        // Initialise Management system
        mgmtManager = getManagement();

        txManager = new TransactionManager();
        if (mgmtManager != null)
        {
            txManager.registerMbean(getDomainName(), getInstanceName(), getManagement().getManagementServer());
        }
View Full Code Here

Examples of org.jtester.core.context.TransactionManager

    Class testedClazz = TestedObject.currTestedClazz();
    ThreadLocal<TransactionManager> clazzLocal = localTransactionManager.get(testedClazz);
    if (clazzLocal == null) {
      return null;
    } else {
      TransactionManager transaction = clazzLocal.get();
      return transaction;
    }
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.apidb.v0_6.impl.TransactionManager

   *            Used to access the database.
   */
    protected void runImpl(DatabaseContext2 dbCtx) {
    Replicator replicator;
    ReplicationSource source;
    TransactionManager txnSnapshotLoader;
    SystemTimeLoader systemTimeLoader;
   
    new SchemaVersionValidator(loginCredentials, preferences)
        .validateVersion(ApidbVersionConstants.SCHEMA_MIGRATIONS);
   
View Full Code Here

Examples of org.socialmusicdiscovery.server.business.logic.TransactionManager

        return entityManager;
    }

    @Provides
    public TransactionManager provideTransactionManager(final EntityManagerFactory entityManagerFactory) {
        return new TransactionManager() {
            @Override
            public void begin() {
                EntityManager entityManager = ENTITY_MANAGER_CACHE.get();
                if(entityManager==null) {
                    entityManager = entityManagerFactory.createEntityManager();
View Full Code Here

Examples of sg.edu.nus.iss.se07.bc.TransactionManager

         * @throws AppException
         */
        public boolean addTransactions(ArrayList<Tuple4<String, String, Integer, Date>> purchases, int newPoint) throws AppException {
                boolean success = true;

                TransactionManager dataObjectManager = new TransactionManager();
                try {
                        dataObjectManager.SaveTransaction(purchases);

                        int totalPoint = 0;
                        for (int i = 0; i < purchases.size(); i++) {
                                String productID = purchases.get(i).getItem1();
                                int amount = purchases.get(i).getItem3();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.