Package org.jboss.tm

Examples of org.jboss.tm.TransactionLocal


         subPool = mcpf.create(mcf, clf, subject, cri, pc, p, this, log);

         if (tm != null)
         {
            trackByTx = new TransactionLocal(tm)
         }
      }
      catch (Throwable t)
      {
         throw new ResourceException("Exception while creating sub pool", t);
View Full Code Here


     
      //Sub-pool internal managed connection pool
      ManagedConnectionPool imcp = subPoolContext.getSubPool();

      // Are we doing track by transaction?
      TransactionLocal trackByTx = subPoolContext.getTrackByTx();
     
      if (trackByTransaction == null || trackByTx == null)
      {
         cl = getSimpleConnection(subject, cri, subPoolContext);
      } //end of if trackByTransaction  
View Full Code Here

            if (!isInterleaving())
            {
               cl.setTrackByTx(true);
               ManagedConnectionPool mcp = (ManagedConnectionPool)cl.getContext();
               SubPoolContext subPool = mcp.getSubPool();
               TransactionLocal trackByTx = subPool.getTrackByTx();
               try
               {
                  trackByTx.lock();
               }
               catch (Throwable t)
               {
                  rethrowAsSystemException("Unable to begin transaction with JCA lazy enlistment scenario",
                                           trackByTx.getTransaction(), t);
               }            
               try
               {
                  trackByTx.set(cl);
               }
               finally
               {
                  trackByTx.unlock();
               }
            }
         }
      }
   }
View Full Code Here

     * This method will create the database table and compile the queries.
     */
    void startStoreManager() throws Exception {
        tm = getComponent().getTransactionManager();

        cascadeDeleteSet = new TransactionLocal(tm) {
            protected Object initialValue() {
                return new CascadeDeleteRegistry();
            }

            public Transaction getTransaction() {
View Full Code Here

    private static final Logger log = Logger.getLogger(TransactionEntityMap.class);
    private final InjectedValue<TransactionManager> transactionManager = new InjectedValue<TransactionManager>();
    private TransactionLocal txSynch;

    public synchronized void start(StartContext context) throws StartException {
        txSynch = new TransactionLocal(transactionManager.getValue()) {
            public Transaction getTransaction() {
                try {
                    return transactionManager.getTransaction();
                } catch (SystemException e) {
                    throw new IllegalStateException("An error occured while getting the " +
View Full Code Here

        listCacheMax = ((JDBCEntityBridge) manager.getEntityBridge()).getListCacheMax();
        listCache = new ListCache(listCacheMax);
    }

    public void start() {
        listMapTxLocal = new TransactionLocal(manager.getComponent().getTransactionManager()) {
            protected Object initialValue() {
                return new HashMap();
            }

            public Transaction getTransaction() {
View Full Code Here

        private LinkedList getCache() {
            return (LinkedList) cacheTxLocal.get();
        }

        public void start() {
            cacheTxLocal = new TransactionLocal(ReadAheadCache.this.manager.getComponent().getTransactionManager()) {
                protected Object initialValue() {
                    return new LinkedList();
                }

                public Transaction getTransaction() {
View Full Code Here

        public M2MRelationManager(final JDBCCMRFieldBridge leftField, final JDBCCMRFieldBridge rightField) {
            this.leftField = leftField;
            this.rightField = rightField;

            relationData = new TransactionLocal(leftField.manager.getComponent().getTransactionManager()) {
                protected Object initialValue() {
                    return new RelationData(leftField, rightField);
                }

                public Transaction getTransaction() {
View Full Code Here

     *
     * @
     */
    public void start() {
        cascadeDeleteStrategy = CascadeDeleteStrategy.getCascadeDeleteStrategy(this);
        relatedPKValuesWaitingForMyPK = new TransactionLocal(this.manager.getComponent().getTransactionManager()) {
            protected Object initialValue() {
                return new HashMap();
            }

            public Transaction getTransaction() {
View Full Code Here

      synchronized(moduleData)
      {
         txDataMap = (TransactionLocal)moduleData.get(TX_DATA_KEY);
         if(txDataMap == null)
         {
            txDataMap = new TransactionLocal();
            moduleData.put(TX_DATA_KEY, txDataMap);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.tm.TransactionLocal

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.