3 Replies Latest reply on Nov 26, 2012 8:10 AM by Dan Berindei

    Unable to Retrieve data from Treecache

    umesh awasthi Newbie

      I am using  Infinispan to save and retrieve my content images.I tested my code with UnitTest and they seems to be working fine for me, but when i am trying to fetch data from the cache it seems the request is getting lost and no information is being returned from the underlying cache manager which is making my browser to hang for quite a long time

       

      this is my piece of code

       

      merchantPath.append( "merchant-" ).append( String.valueOf( storeId ) );
      final Fqn contentFiles = Fqn.fromString( "contentFiles" );
       Node<String, Object> contentFilesNode = treeCache.getRoot().getChild( contentFiles );
      Node<String, Object> merchantNode = contentFilesNode.getChild( Fqn.fromString( merchantPath.toString() ) );
      

       

       

      while doing debugging

      contentFilesNode 
      

      is giving me data but when call goes to

      contentFilesNode.getChild
      

      seems like its not reeturning back.

       

      I am not sure whats going wrong here as same code is working perfect in my Unit Test cases and i am using same data for the web request.

       

      As an added infromation, i have inserted data using Unit Test and trying to fetch saved data using web-request.

       

      we are using h2 database for Infinispan while in general i am using MySQL for my web-application

       

      Can any one help me to find the root cause of this issue?

       

      Thanks

      Umesh