Package org.jboss.tm

Examples of org.jboss.tm.TransactionLocal


/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 562 */       throw new RuntimeException(ex);
/*     */     }
/* 564 */     this.txState = new TransactionLocal();
/* 565 */     this.txVersion = new TransactionLocal();
/* 566 */     this.methodMap = mapMethodMap;
/*     */   }
View Full Code Here


/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 324 */       throw new RuntimeException(ex);
/*     */     }
/* 326 */     this.txState = new TransactionLocal();
/*     */   }
View Full Code Here

/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 791 */       throw new RuntimeException(ex);
/*     */     }
/* 793 */     this.txState = new TransactionLocal();
/* 794 */     this.txVersion = new TransactionLocal();
/* 795 */     this.methodMap = listMethodMap;
/*     */   }
View Full Code Here

/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 567 */       throw new RuntimeException(ex);
/*     */     }
/* 569 */     this.txState = new TransactionLocal();
/* 570 */     this.txVersion = new TransactionLocal();
/* 571 */     this.methodMap = setMethodMap;
/*     */   }
View Full Code Here

/*     */   protected Constructor proxyClassConstructor;
/*     */   private final TransactionLocal cache;
/*     */
/*     */   public BaseLocalProxyFactory()
/*     */   {
/* 109 */     this.cache = new TransactionLocal()
/*     */     {
/*     */       protected Object initialValue()
/*     */       {
/* 113 */         return new HashMap();
/*     */       }
View Full Code Here

/*     */
/*     */     public void invokeEjbStore(Thread thread, EntityEnterpriseContext instance) throws Exception {  } } ;
/*     */
/*     */   public GlobalTxEntityMap()
/*     */   {
/*  53 */     this.txSynch = new TransactionLocal();
/*     */   }
View Full Code Here

/*     */   private RelationTable[] relationTables;
/*     */   private TransactionLocal localViews;
/*     */
/*     */   public Schema()
/*     */   {
/*  47 */     this.localViews = new TransactionLocal()
/*     */     {
/*     */       protected Object initialValue()
/*     */       {
/*  51 */         Transaction tx = getTransaction();
/*     */
View Full Code Here

/*     */   protected ArrayList enlisted;
/*     */   protected Synchronization ccmSynch;
/*     */
/*     */   public static void setTransactionManager(TransactionManager tm)
/*     */   {
/*  72 */     txSynchs = new TransactionLocal(tm);
/*     */   }
View Full Code Here

/*  604 */       Object key = getKey(subject, cri, separateNoTx);
/*  605 */       JBossManagedConnectionPool.SubPoolContext subPool = getSubPool(key, subject, cri);
/*      */
/*  607 */       InternalManagedConnectionPool mcp = subPool.getSubPool();
/*      */
/*  610 */       TransactionLocal trackByTx = subPool.getTrackByTx();
/*      */
/*  613 */       if ((trackByTransaction == null) || (trackByTx == null))
/*      */       {
/*  615 */         ConnectionListener cl = mcp.getConnection(subject, cri);
/*  616 */         if (this.traceEnabled)
/*  617 */           dump("Got connection from pool " + cl);
/*  618 */         return cl;
/*      */       }
/*      */
/*      */       try
/*      */       {
/*  624 */         trackByTx.lock(trackByTransaction);
/*      */       }
/*      */       catch (Throwable t)
/*      */       {
/*  628 */         JBossResourceException.rethrowAsResourceException("Unable to get connection from the pool for tx=" + trackByTransaction, t);
/*      */       }
/*      */
/*      */       try
/*      */       {
/*  633 */         ConnectionListener cl = (ConnectionListener)trackByTx.get(trackByTransaction);
/*  634 */         if (cl != null)
/*      */         {
/*  636 */           if (this.traceEnabled)
/*  637 */             dump("Previous connection tracked by transaction " + cl + " tx=" + trackByTransaction);
/*  638 */           ConnectionListener localConnectionListener1 = cl;
/*      */           return localConnectionListener1;
/*      */         } } finally { trackByTx.unlock(trackByTransaction);
/*      */       }
/*      */
/*  652 */       ConnectionListener cl = mcp.getConnection(subject, cri);
/*  653 */       if (this.traceEnabled) {
/*  654 */         dump("Got connection from pool tracked by transaction " + cl + " tx=" + trackByTransaction);
/*      */       }
/*      */
/*      */       try
/*      */       {
/*  659 */         trackByTx.lock(trackByTransaction);
/*      */       }
/*      */       catch (Throwable t)
/*      */       {
/*  663 */         mcp.returnConnection(cl, false);
/*  664 */         if (this.traceEnabled)
/*  665 */           dump("Had to return connection tracked by transaction " + cl + " tx=" + trackByTransaction + " error=" + t.getMessage());
/*  666 */         JBossResourceException.rethrowAsResourceException("Unable to get connection from the pool for tx=" + trackByTransaction, t);
/*      */       }
/*      */
/*      */       try
/*      */       {
/*  671 */         ConnectionListener other = (ConnectionListener)trackByTx.get(trackByTransaction);
/*  672 */         if (other != null)
/*      */         {
/*  674 */           mcp.returnConnection(cl, false);
/*  675 */           if (this.traceEnabled)
/*  676 */             dump("Another thread already got a connection tracked by transaction " + other + " tx=" + trackByTransaction);
/*  677 */           localConnectionListener2 = other;
/*      */           return localConnectionListener2;
/*      */         }
/*  681 */         cl.setTrackByTx(true);
/*  682 */         trackByTx.set(cl);
/*  683 */         if (this.traceEnabled)
/*  684 */           dump("Using connection from pool tracked by transaction " + cl + " tx=" + trackByTransaction);
/*  685 */         ConnectionListener localConnectionListener2 = cl;
/*      */         return localConnectionListener2; } finally { trackByTx.unlock(trackByTransaction); } throw localObject2;
/*      */     }
View Full Code Here

/*      */
/*      */     public SubPoolContext(TransactionManager tm, ManagedConnectionFactory mcf, ConnectionListenerFactory clf, Subject subject, ConnectionRequestInfo cri, InternalManagedConnectionPool.PoolParams poolParams, Logger log)
/*      */     {
/*  497 */       this.subPool = new InternalManagedConnectionPool(mcf, clf, subject, cri, poolParams, log);
/*  498 */       if (tm != null)
/*  499 */         this.trackByTx = new TransactionLocal(tm);
/*      */     }
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.