IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.cs.invoker.cache
Class BeanInvokerProxyCache

java.lang.Object
  extended bycom.ibm.btt.cs.invoker.cache.BeanInvokerProxyCache
All Implemented Interfaces:
InvokerCache

public class BeanInvokerProxyCache
extends java.lang.Object
implements InvokerCache

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:

  • 1) 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.
  • 2) Bean Proxy is created by the corresponding Bean Invoker.
  • 3) 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.


    Constructor Summary
    BeanInvokerProxyCache()
               
     
    Method Summary
     void clear()
              Clear data before set into cache
     void clear(java.lang.String sessionID)
              Clear data according to SessionID
     java.lang.Object createBeanInvokerProxyFromCache(java.lang.String requestID, java.lang.String sessionID, java.lang.String subSessionID)
              If a Bean Invoker Proxy is available for a given request and session, returns the BeanInvoker Proxy and removes it from cache;
     void putBeanInvokerProxyIntoCache(java.lang.String requestID, java.lang.String sessionID, java.lang.String subSessionID, java.lang.Object ejbObject)
              Put the BeanInvokerProxy into cache
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    BeanInvokerProxyCache

    public BeanInvokerProxyCache()
    Method Detail

    createBeanInvokerProxyFromCache

    public java.lang.Object createBeanInvokerProxyFromCache(java.lang.String requestID,
                                                            java.lang.String sessionID,
                                                            java.lang.String subSessionID)
    If a Bean Invoker Proxy is available for a given request and session, returns the BeanInvoker Proxy and removes it from cache;

    Parameters:
    requestID - used to locate the BeanInvoker Proxy object
    sessionID -
    subSessionID -
    Returns:
    Object EJBObject Object

    putBeanInvokerProxyIntoCache

    public void putBeanInvokerProxyIntoCache(java.lang.String requestID,
                                             java.lang.String sessionID,
                                             java.lang.String subSessionID,
                                             java.lang.Object ejbObject)
    Put the BeanInvokerProxy into cache

    Parameters:
    requestID - used to locate the BeanInvoker Proxy object
    sessionID -
    subSessionID -
    ejbObject - EJBObject

    clear

    public void clear()
    Description copied from interface: InvokerCache
    Clear data before set into cache

    Specified by:
    clear in interface InvokerCache
    See Also:
    InvokerCache.clear()

    clear

    public void clear(java.lang.String sessionID)
    Description copied from interface: InvokerCache
    Clear data according to SessionID

    Specified by:
    clear in interface InvokerCache

    IBM Branch Transformation Toolkit Javadoc

    (c) Copyright IBM Corporation 1998, 2005