[jboss-cvs] JBossCache/etc ...

Ben Wang bwang at jboss.com
Tue Sep 26 06:26:09 EDT 2006


  User: bwang   
  Date: 06/09/26 06:26:09

  Modified:    etc      plain.bsh
  Log:
  Fixed with new APIs.
  
  Revision  Changes    Path
  1.3       +4 -7      JBossCache/etc/plain.bsh
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: plain.bsh
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/etc/plain.bsh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- plain.bsh	9 Apr 2006 12:33:47 -0000	1.2
  +++ plain.bsh	26 Sep 2006 10:26:09 -0000	1.3
  @@ -2,7 +2,7 @@
   // Beanshell script to run the regular transactional tree cache demo
   //
   import org.jboss.cache.*;
  -import org.jboss.cache.aop.PojoCache;
  +import org.jboss.cache.factories.DefaultCacheFactory;
   
   // Tx imports
   import javax.transaction.UserTransaction;
  @@ -21,10 +21,7 @@
       "org.jboss.cache.transaction.DummyContextFactory");
   tx = (UserTransaction)new InitialContext(prop).lookup("UserTransaction");
   
  -tree = new TreeCache();
  -config = new PropertyConfigurator();
  -// configure tree cache. 
  -config.configure(tree, "META-INF/replSync-service.xml");
  +// This will start the cache automatically
  +Cache cache = new DefaultCacheFactory().createCache("META-INF/replSync-service.xml");
   
  -tree.startService();
  -tree.put("/a/b/c", "key1", "val1");
  \ No newline at end of file
  +cache.put(Fqn.fromString("/a/b/c"), "key1", "val1");
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list