5 Replies Latest reply on Mar 21, 2011 4:12 AM by damiano.pezzotti

    Problem with TreeCache

    damiano.pezzotti

      Hi,

      I have a problem with Infinispan TreeCache adapter.

       

      I build a treeCache data using the following code

       

              final Node rootNode = treeCache.getRoot();

              rootNode.addChild( Fqn.fromElements( "a", "b1", "c11" ) ).put(  "n1", "v1"  );

              rootNode.addChild( Fqn.fromElements( "a", "b1", "c12" ) ).put(  "n11", "v11"  );

              rootNode.addChild( Fqn.fromElements( "a", "b2", "c21"  ) ).put( "n2", "v2" );

       

      When I try to access "a" children, I expect to obtain b1 and b2, but executing the following code

       

              logger.info( treeCache.getNode( Fqn.fromString( "a/" ) ).getChildrenNames() );

       

      I obtain only b1

       

      If I access directly node b2, I can obtaing a ref on it.

       

              logger.info( treeCache.getNode( Fqn.fromString( "a/b2" ) ));

       

                --> NodeImpl{fqn=/a/b2}

       

      Is it a bug?

       

      Thanks

      Damy