[jboss-cvs] JBossCache/src/org/jboss/cache/aop ...

Ben Wang bwang at jboss.com
Tue Jul 11 06:09:53 EDT 2006


  User: bwang   
  Date: 06/07/11 06:09:53

  Modified:    src/org/jboss/cache/aop  Tag: Branch_JBossCache_1_4_0
                        PojoCache.java
  Log:
  JBCACHE-691 PojoCache can throw excpetion if tm is configured differently.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.23.2.2  +7 -2      JBossCache/src/org/jboss/cache/aop/PojoCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/PojoCache.java,v
  retrieving revision 1.23.2.1
  retrieving revision 1.23.2.2
  diff -u -b -r1.23.2.1 -r1.23.2.2
  --- PojoCache.java	7 Jul 2006 01:47:06 -0000	1.23.2.1
  +++ PojoCache.java	11 Jul 2006 10:09:53 -0000	1.23.2.2
  @@ -741,10 +741,15 @@
               Transaction tx = getLocalTransaction();
               if(tx == null)
               {
  +               tx = localTm_.getTransaction();
  +            }
  +
  +            if(tx == null)
  +            {
                  throw new IllegalStateException("PojoCache.registerTxHanlder(). Can't have null tx handle.");
               }
  -            getLocalTransaction().registerSynchronization(
  -                 new PojoTxSynchronizationHandler(getLocalTransaction(), this));
  +            tx.registerSynchronization(
  +                 new PojoTxSynchronizationHandler(tx, this));
   
               hasSynchronizationHandler_.set(Boolean.TRUE);
            }
  
  
  



More information about the jboss-cvs-commits mailing list