1 Reply Latest reply on Jan 29, 2003 3:24 AM by slaboure

    Caching JNDI queries or not ?

    wismax

      Hi,

      I read the jboss clustering doc and there a point that's not perfectly clear to me. On page 27 it is recommended to cache the result of my jndi queries and on page 29 it is said that at each jndi invocation, the list of targets is updated.
      If I cache my objects after their first lookup, does it means that the list of targets won't be updated ? Or does "jndi invocation" mean something other that lookup ?
      Well there's probably something that I don't understand...

      Any advices for a good solution for this lookup objects in clustering environment will be greatly appreciated !

      Cheers,

      Fred

        • 1. Re: Caching JNDI queries or not ?
          slaboure

          yes and yes ;)

          Even if you cache it, your local list will be udpated: each time you use your JNDI Context to make a lookup, you not only receive the answer/result of the lookup but the new list of targets (if any) as well => each time you use your context, you potentially receive the new list of targets transparently.

          Cheers,


          sacha