4 Replies Latest reply on Sep 13, 2005 4:55 AM by belaban

    Great but...

    ccsaxton

      Just a few niggly issues...

      1. Can I create a new node and then set that nodes eviction policy without having to shutdown and restart the cache service?

      2. The CacheListener seems to be called too eary...For instance...If I add a node to the cache then I would like a reference to that node not just the node ID...Trying to get a reference to the node by using the FQN just returns null!! What uses does the cachelistener give you? Using a cache listener to implement eviction policies seems a little wrong!!

      3. Does the thread that runs against the cache run against all instances of the cache or does a new thread get created everytime?

      Besides that guys its a nice peice of work...

        • 1. Re: Great but...
          belaban

          #1 I leave this to Ben...

          #2 Can you check out the CallbackTest unit tests ? Please provide us with unit tests that show what IYO are incorrect semantics. Note that we will move all callback-related logic into its own interceptor in 1.3.

          #3 I assume you mean for replication. A new thread is used (but not created). Essentially the listener thread which receives the replication message. *However*, we use the same global transaction, so the 2PC works.

          • 2. Re: Great but...

            You can't create *Region* (essentially a sub-tree) dynamically now.

            -Ben

            • 3. Re: Great but...
              ccsaxton

               

              "bela@jboss.com" wrote:

              #3 I assume you mean for replication. A new thread is used (but not created). Essentially the listener thread which receives the replication message. *However*, we use the same global transaction, so the 2PC works.


              I was assuming that the cache uses a thread for the eviction policy even if it is not a replicated cache...(is that not so...I haven't looked at the code yet). This assumption was made on the premise that I have to call startService and stopService methods.

              #2 is easy to replicate...create a listener and add it to a cache...add a node to the cache and then in the listener logic that catches the node add event just try and lookup the newly added node from the cache using the passed FQN...returns null.

              • 4. Re: Great but...
                belaban

                Look at CallbackTest:
                testLocalGetCallbackSameFqnWithoutTransaction()

                does exactly what you describe, and passes. Can you check whether this works for you ?