[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-cache/src/main/org/jboss/cache TreeCache.java
From:       Ben Wang <bwang00 () users ! sourceforge ! net>
Date:       2004-08-31 16:15:10
Message-ID: E1C2BHq-0006jL-BO () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

  User: bwang00 
  Date: 04/08/31 09:15:10

  Modified:    src/main/org/jboss/cache TreeCache.java
  Log:
  Made LockStrategyFactory cache per instance so different caches can have different \
lock level  
  Revision  Changes    Path
  1.154     +14 -11    jboss-cache/src/main/org/jboss/cache/TreeCache.java
  
  Index: TreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/TreeCache.java,v
  retrieving revision 1.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- TreeCache.java	30 Aug 2004 12:31:13 -0000	1.153
  +++ TreeCache.java	31 Aug 2004 16:15:09 -0000	1.154
  @@ -40,7 +40,7 @@
    *
    * @author Bela Ban
    * @author Ben Wang
  - * @version $Id: TreeCache.java,v 1.153 2004/08/30 12:31:13 belaban Exp $
  + * @version $Id: TreeCache.java,v 1.154 2004/08/31 16:15:09 bwang00 Exp $
    * @jmx.mbean extends="org.jboss.system.ServiceMBean"
    * <p/>
    * todo: emit notifications only on commit. bad case: emit notif about node \
creation,  @@ -115,14 +115,12 @@
       */
      protected Replicatable replication_handler=null;
   
  -
      /**
       * Maintains (a) mapping between Transaction and GlobalTransactions and
       * (b) between GlobalTransactions and TransactionEntries
       */
      protected TransactionTable tx_table=new TransactionTable();
   
  -
      /**
       * Method to acquire a TransactionManager. By default we use \
                JBossTransactionManagerLookup. Has
       * to be set before calling {@link #start()}
  @@ -174,9 +172,10 @@
      /** synchronous or asynchrous rollback phase ? */
      protected boolean sync_rollback_phase=false;
   
  -
      protected String jndi_name=null;
   
  +   // lock strategy factory is now per cache instance
  +   protected LockStrategyFactory lock_strategy_factory = null;
      /**
       * Queue used to replicate updates when mode is repl-async
       */
  @@ -199,14 +198,10 @@
       */
      public static final int REPL_SYNC=3;
   
  -
      static final String JNDI_PREFIX="/JBossCache/";
   
      static final String UNINITIALIZED="jboss:internal:uninitialized";
   
  -
  -
  -
      static {
         try {
            put_data_method=TreeCache.class.getMethod("_put",
  @@ -272,12 +267,10 @@
         crud_methods.add(remove_data_method);
      }
   
  -
      public static boolean isCrudMethod(Method m) {
         return m == null? false : crud_methods.contains(m);
      }
   
  -
      /**
       * Creates a channel with the given properties. Connects to the channel, then \
                creates a PullPushAdapter
       * and starts it
  @@ -289,10 +282,14 @@
         if(props != null)
            this.cluster_props=props;
         this.state_fetch_timeout=state_fetch_timeout;
  +
  +      init();
      }
   
      public TreeCache() throws Exception {
         super();
  +
  +      init();
      }
   
      /**
  @@ -301,6 +298,12 @@
      public TreeCache(JChannel channel) throws Exception {
         super();
         this.channel=channel;
  +
  +      init();
  +   }
  +
  +   protected void init() {
  +      lock_strategy_factory = LockStrategyFactory.getInstance();
      }
   
      /**
  @@ -827,7 +830,7 @@
            locking=true;
         else
            locking=false;
  -      LockStrategyFactory.setIsolationLevel(level);
  +      lock_strategy_factory.setIsolationLevel(level);
      }
   
      /**
  
  
  


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic