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

Manik Surtani msurtani at jboss.com
Fri Aug 18 15:34:21 EDT 2006


  User: msurtani
  Date: 06/08/18 15:34:21

  Modified:    src/org/jboss/cache   TransactionEntry.java TreeCache.java
  Log:
  Habanero stabilisation efforts - Fixed NPE
  
  Revision  Changes    Path
  1.10      +2 -2      JBossCache/src/org/jboss/cache/TransactionEntry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TransactionEntry.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionEntry.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- TransactionEntry.java	19 Jul 2006 21:34:45 -0000	1.9
  +++ TransactionEntry.java	18 Aug 2006 19:34:21 -0000	1.10
  @@ -31,7 +31,7 @@
    * </ul>
    *
    * @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public class TransactionEntry {
   
  @@ -237,7 +237,7 @@
   
      private void undo(MethodCall undo_op, CacheSPI cache) {
         try {
  -         Object retval = undo_op.invoke(cache);
  +         Object retval = undo_op.invoke(((TreeCacheProxyImpl)cache).treeCache);
             if (retval instanceof Throwable)
             {
                 throw (Throwable) retval;
  
  
  
  1.220     +19 -6     JBossCache/src/org/jboss/cache/TreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
  retrieving revision 1.219
  retrieving revision 1.220
  diff -u -b -r1.219 -r1.220
  --- TreeCache.java	18 Aug 2006 15:40:40 -0000	1.219
  +++ TreeCache.java	18 Aug 2006 19:34:21 -0000	1.220
  @@ -74,7 +74,7 @@
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    * @author Brian Stansberry
    * @author Daniel Huang (dhuang at jboss.org)
  - * @version $Id: TreeCache.java,v 1.219 2006/08/18 15:40:40 msurtani Exp $
  + * @version $Id: TreeCache.java,v 1.220 2006/08/18 19:34:21 msurtani Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -542,10 +542,12 @@
      protected void _createService() throws Exception
      {
          stateFetchTimeout = configuration.getLockAcquisitionTimeout() + 5000;
  -       if (configuration.isNodeLockingOptimistic()) root = NodeFactory.getInstance().createRootDataNode(NodeFactory.NODE_TYPE_OPTIMISTIC_NODE, this);
  -
  +       if (configuration.isNodeLockingOptimistic())
  +       {
  +           root = NodeFactory.getInstance().createRootDataNode(NodeFactory.NODE_TYPE_OPTIMISTIC_NODE, this);
          // prepare an SPI interface to the root node
          rootSpi = new TreeCacheProxyImpl(this, (NodeImpl) root);
  +       }
   
          notifier = new Notifier(getCacheSPI());
   
  @@ -3991,6 +3993,17 @@
   
       public CacheSPI getCacheSPI()
       {
  +
  +       if (configuration.isNodeLockingOptimistic())
  +       {
  +           root = NodeFactory.getInstance().createRootDataNode(NodeFactory.NODE_TYPE_OPTIMISTIC_NODE, this);
  +           // prepare an SPI interface to the root node
  +           rootSpi = new TreeCacheProxyImpl(this, (NodeImpl) root);
  +       }
  +       else if (rootSpi == null)
  +       {
  +           rootSpi = new TreeCacheProxyImpl(this, (NodeImpl) root);
  +       }
           return rootSpi;
       }
   
  
  
  



More information about the jboss-cvs-commits mailing list