com.ibm.btt.cs.invoker.cache
Interface InvokerCache
- All Known Implementing Classes:
- BeanInvokerCache, BeanInvokerProxyCache, EJBHomeCache
- public interface InvokerCache
In Bean Invoker Pattern, there are three cache type:
Consider that BTT V5.0 can be deployed in WAS V5 Base Edition, it is impossible to use Object Pooling
technology provided by WAS. The Bean Invoker Pool function will be implemented by Bean Invoker Pattern itself.
The purpose of object pooling is to improve performance with caching. Bean Invokers are stored into a pool.
Along with each Bean Invoker is a request ID. When an object is returned from the pool, it should be removed
so that it will not be returned for another request again. Objects should be released back to the pool after
each request.
If a Bean Invoker is available for a given request, the Bean Invoker Factory returns the Invoker and removes
it from pool; if not, the Bean Invoker Factory will create one instead. Caching should be optional and a
configuration point should be available. If caching is offline, every access to the Bean Invoker Factory will result
in a Bean Invoker creation. After the usage of a Bean Invoker is completed, it is returned to the Bean Invoker Factory
and put the invoker into pool. Before the factory returns a Bean Invoker, a corresponding Bean Proxy should be
retrieve form the Bean Proxy cache and set into the Bean Invoker.
Bean Proxy Cache: Similar to the Bean Invoker Pool, the purpose of the Bean Proxy Cache is also improving
performance. Bean Proxy Cache use similar logic as the Bean Invoker Pool with the following differences:
Each Bean Proxy in the cache has not only a request ID, but also a session ID associated with it.
Bean Proxy is only reused within the same session. When a bean¡¯s corresponding session is completed,
all related Bean Proxy should be removed.
Bean Proxy is created by the corresponding Bean Invoker
Associated with each Bean Proxy should also be a timestamp. Bean Proxy related to a session is removed
when the session is completed. However, dead proxies can still exist if any session closing has failed.
Automatic proxy expiration detection will not be available in Bean Invoker Factory for this release, but
a timestamp should be around for the status of the proxy
EJBHome Cache: Since EJBHome object is statless, the EJBHome object will be kept as static object.
Field Summary |
static java.lang.String |
COPYRIGHT
|
Method Summary |
void |
clear()
Clear data before set into cache |
void |
clear(java.lang.String key)
Clear data according to SessionID |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
clear
public void clear()
- Clear data before set into cache
clear
public void clear(java.lang.String key)
- Clear data according to SessionID
(c) Copyright IBM Corporation 1998, 2005