Adapter for Enterprise JavaBeans 6.5 SP3 | webMethods Adapter for Enterprise JavaBeans Documentation | webMethods Adapter for Enterprise JavaBeans Installation and User’s Documentation | Overview of webMethods Adapter for Enterprise JavaBeans | Adapter Connections | EJB Information Caching
 
EJB Information Caching
An adapter connection may be configured to cache information retrieved from the JNDI server. This information is available to all connection instances created by that adapter connection. It is retained in memory for a period of time determined by the level of caching selected. Information in the cache is used during design time when you configure adapter services and assign a connection. Caching has no impact on adapter services or connections at runtime.
Caching allows the adapter connection to minimize the number of round-trip accesses to the JNDI server for the purpose of retrieving information about the EJBs bound in that server. Typically, this information is static: an EJB that was available yesterday is likely still available today. For large EJB installations, the costs associated with retrieving this information repetitively from JNDI may be prohibitive.
Which caching level works best varies from site to site, and is influenced by a variety of external factors: for example, network overhead, capacity of the JNDI server, capacity of Integration Server, and size of the JNDI tree. In general, no caching (None) should be avoided on development systems and Hard caching should be avoided on production systems.
Adapter for Enterprise Javabeans uses the cache level specified for the connection when you configure an adapter service using Designer's adapter service editor. Adapter for Enterprise Javabeans supports the following caching levels:
Caching Level
Description
None
No caching occurs. When configuring the adapter service, the connection retrieves EJB details directly from the JNDI. This level of caching is suitable when working against a very small set of deployed EJBs with little network latency between Adapter for Enterprise Javabeans and the application server.
Weak
Based on the Java WeakReference implementation. Information in the cache is retained as long as there are outstanding weak references to the cache. When no such references remain, the JVM reclaims the memory consumed by the cache.
Soft
Based on the Java SoftReference implementation. Information in the cache is retained until the JVM is forced to throw an OutOfMemoryError in response to a memory allocation request. At this point, it frees the memory in the cache.
Hard
Data is retrieved from the JNDI once and cached until no more connections remain enabled for the connection factory. Subsequent requests for EJB detail are retrieved from the cache. This level of caching results in the fewest round-trip lookups on JNDI at the expense of more virtual memory being tied up in Integration Server for longer periods of time.