3 Replies Latest reply on Sep 18, 2006 12:57 PM by sphinxmember

    removeObject() in PojoCache !!

    sphinxmember

      Hi ,

      Invocation of pojoCache.removeObject("abcdefghijk") results in a generation of nodecreate and nodemodify event

      [java] created:/abcdefghijk
      [java] FQN of the node modified: /abcdefghijk
      [java] ---------------------------------------------

      These are the statements printed in the listner call back, I am extending AbstractTreeCacheListener and using 1.4.0.GA

      Is this behavior expected..?

        • 1. Re: removeObject() in PojoCache !!
          sphinxmember

           

          "sphinxmember" wrote:
          Hi ,

          Invocation of pojoCache.removeObject("abcdefghijk") results in a generation of nodecreate and nodemodify event

          [java] created:/abcdefghijk
          [java] FQN of the node modified: /abcdefghijk
          [java] ---------------------------------------------

          These are the statements printed in the listner call back, I am extending AbstractTreeCacheListener and using 1.4.0.GA

          Is this behavior expected..?


          • 2. Re: removeObject() in PojoCache !!

            There should not be nodeCreated event though? It should however has:

            1. nodeModified, because I am locking the node before doing the whole removal to preserver object level locking. This is going away in 2.0, BTW.

            2. nodeRemoved, as expected.

            • 3. Re: removeObject() in PojoCache !!
              sphinxmember

              These behavior was observed while running the samples shipped with jboss cache under examples\PojoCache\annotated50, after making a change of removing a non-existent node in the cache.

              Both node create and node modify event are received by the listener.
              I am using TreeCache's remove() method call instead of removeObject(), Kindly confirm if its fine to do so.

              Thx