Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Integration Server Administrator's Guide | Configuring Integration Server for JMS Messaging | Working with JNDI Providers | JNDI Provider Cache and Timeout Behavior for Administered Objects
 
JNDI Provider Cache and Timeout Behavior for Administered Objects
Integration Server retrieves administered objects through JNDI when a JMS connection alias is enabled. Integration Server does this by instantiating a new context object using the specified JNDI provider. Integration Server employs this context to look up the connection factory and destinations specified by the JMS triggers, message sending services, and message receiving services that use the JMS connection alias.
Most JNDI provider implementations, including the webMethods Broker implementation, automatically cache administered objects locally when the context is instantiated. There are some JNDI providers, however, in which the caching and timeout behavior for administered objects is configurable on the provider. In most cases, using this type of provider is not an issue because the destination is cached by Integration Server when it is looked up. Integration Server only needs to look it up one time, and then all subsequent lookups are retrieved locally. However, if the administered objects are not cached in the context or if they have timed out, then a lookup request may require a new connection to the JNDI provider.
In this case, if the JNDI provider becomes unavailable after enabling the connection alias but before retrieving the destination, a NamingException can occur. The JNDI failover functionality in Integration Server addresses this situation. If Integration Server is unable to retrieve the destination from its original context, it will create a new context from one of the failover JNDI providers.
Keep in mind that, because Integration Server caches the destinations locally, it is possible that the cached destinations may become stale. In this case, the original destination will be used. You can reload administered objects by enabling and disabling the connection alias or monitoring the connection object for changes. If the administered objects are no longer usable, a ServiceException will occur. For more information about monitoring connections, see Monitoring a Connection Factory Object for Changes.