Hello!
I'm trying to create a TreeCache in a JBoss Server Cluster with 3 Servers. They share 
the same Partition (DefaultPartition) and are a clean server/all configuration.
Now I tried to establish a Stateless Session Bean with a single method, shown below:


  |     public
  |     void createTreeCache()
  |     {
  |         //## begin ControllerBean::createTreeCache%40A1C2520244.body preserve=yes
  |         try
  |         {
  |             TreeCache tree = new TreeCache();
  |             tree.setClusterName("demo-cluster");
  |             tree.setTransactionManagerLookupClass( 
"org.jboss.cache.DummyTransactionManagerLookup" );
  |             tree.setCacheMode(TreeCache.REPL_SYNC);
  |             tree.startService(); // kick start tree cache
  |             tree.put("/a/b/c", "name", "Ben");
  |             java.util.Iterator i = tree.getChildrenNames( "/a/b/c" ).iterator();
  |             while( i.hasNext() )
  |                 System.out.println(">>>>>>>>>>>" + i.next().toString() + 
"<<<<<<<<<<<");
  |             tree.remove("/a/b");
  |             tree.stopService();            
  |         }
  |         catch(Exception e)
  |         {
  |             e.printStackTrace();
  |         }
  |         //## end ControllerBean::createTreeCache%40A1C2520244.body
  |     }   // --- end of createTreeCache --------------------------------------------
  | 
I know I should use an property XML file, but for now...

Now, here is my problem:
First I started only one server and the JBoss output was:
anonymous wrote : 
  | 10:10:56,332 INFO  [MainDeployer] Deployed package: 
file:/D:/Projects/Java/jboss3/server/all/deploy/test-ejb.jar
  | 10:10:59,276 INFO  [STDOUT] >>>>>>>>>>>Creating<<<<<<<<<<<
  | 10:10:59,276 INFO  [TreeCache] cache mode is REPL_SYNC
  | 10:10:59,317 INFO  [STDOUT]
  | -------------------------------------------------------
  | GMS: address is pc153:4699
  | -------------------------------------------------------
  | 10:11:01,940 INFO  [TreeCache] viewAccepted(): new members: [pc153:4699]
  | 10:11:01,970 INFO  [TreeCache] state could not be retrieved (must be first member 
in group)
  | 10:11:01,970 ERROR [STDERR] java.lang.NullPointerException
  | 10:11:01,980 ERROR [STDERR]     at 
com.siemens.is.its.airfield.aglseries.test.ControllerBean.createTreeCache(ControllerBean.java:182)
  | 10:11:02,000 ERROR [STDERR]     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 10:11:02,010 INFO  [TreeCache] setState(): new cache is null (maybe first member 
in cluster)
  | ... (many more of 'em!)
  | 
Now, where lies the problem, is this way I've chosen the correct way of getting values 
out of the TreeCache?

Greetings and many thanks 
Victor Sauermann

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834764#3834764

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834764


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to