Announcement Announcement Module
Collapse
No announcement yet.
Does Spring handle stale JNDI destinations? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Spring handle stale JNDI destinations?

    Hi,

    Reading the WebLogic documentation http://download.oracle.com/docs/cd/E...html#wp1311973 it states:

    ..some JMS providers, like WebLogic JMS, may invalidate a Destination object after a server failure. So, if the EJB runs on Server A, and JMS runs on Server B, then the EJB on Server A will have to perform the JNDI lookup of the objects from Server B again after that server has recovered.


    So if I am using Spring to load all my JNDI objects at context startup, will it handle doing to re-lookups automatically if my JMS Provider does invalidate the Destination object?

    Thanks for any help,

    Mandy

  • #2
    JndiDestinationResolver has a setCache method which defaults to true and also implements the CachingDestinationResolver interface which allows removal of specific items from the cache or the clearing of the cache. Set caching to false will cause some performance overhead so you may want check how much of a performance overhead that causes before considering that as an option.

    A better solution would be to detect the exception indicating that the destination is no longer valid and remove that particular destination from the cache.

    Jonas

    Comment


    • #3
      Thanks for the reply Jonas, pls could you explain how I can detect the exception? Also, to remove the destination from the cache do I just get hold of the JndiDestinationResolver bean from the application context and call removeFromCache()? If so, is the param to removeFromCache() the bean name of the destination or the jndi lookup name?

      Thanks

      Mandy

      Comment

      Working...
      X