org.ow2.carol.cmi.ejb2_1.rpc
Class EJBHomeInvocationHandler
java.lang.Object
org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
org.ow2.carol.cmi.ejb2_1.rpc.EJBHomeInvocationHandler
- All Implemented Interfaces:
- java.io.Serializable, java.lang.reflect.InvocationHandler
@ThreadSafe
public class EJBHomeInvocationHandler
- extends org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
This class intercepts the invocations on the home interface of a stateless ejb2.
It is created by org.ow2.carol.cmi.rpc.CMIProxyFactory#newCMIProxy(ClusterViewManager, String, String).
- Author:
- The new CMI team
- See Also:
org.ow2.carol.cmi.rpc.CMIProxyFactory,
Serialized Form
| Fields inherited from class org.ow2.carol.cmi.rpc.CMIInvocationHandler |
clusterViewManager, cmiProxyHandle, itf, objectName, protocolName |
|
Constructor Summary |
EJBHomeInvocationHandler(java.lang.ClassLoader classLoader,
org.ow2.carol.cmi.controller.common.ClusterViewManager clusterViewManager,
java.lang.String objectName,
java.lang.String protocolName,
java.lang.Class<? extends javax.ejb.EJBHome> homeClass)
Build a new EJB2 Invocation Handler for the home interface. |
|
Method Summary |
protected void |
checkInitialized()
|
protected org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> |
getCMIReferenceable(org.ow2.carol.cmi.reference.CMIReference cmiReference)
|
protected EJBHomeHandle |
getHandle(org.ow2.carol.cmi.rpc.CMIProxy cmiProxy)
|
protected java.lang.String |
getHandleMethodName()
|
protected java.lang.Object |
invokeRemoteMethod(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object... args)
Handles remote methods. |
protected void |
onExceptionHook(java.lang.String objectName,
org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> cmiReferenceable)
|
protected void |
onFinallyHook(java.lang.String objectName,
org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> cmiReferenceable)
|
protected java.lang.String |
proxyToString(java.lang.Object proxy)
Returns a string representation for a proxy that uses this invocation
handler. |
| Methods inherited from class org.ow2.carol.cmi.rpc.CMIInvocationHandler |
getCurrentRef, invoke, postInvokeHook, preInvokeHook, setClassLoader, setCmiProxyHandle, setCurrentRef |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EJBHomeInvocationHandler
public EJBHomeInvocationHandler(java.lang.ClassLoader classLoader,
org.ow2.carol.cmi.controller.common.ClusterViewManager clusterViewManager,
java.lang.String objectName,
java.lang.String protocolName,
java.lang.Class<? extends javax.ejb.EJBHome> homeClass)
- Build a new EJB2 Invocation Handler for the home interface.
- Parameters:
classLoader - the classloader to use (when the smart factory is used, it is the smart classloader)clusterViewManager - A manager of the cluster viewobjectName - a name of the objectprotocolName - a protocol to perform the invocationhomeClass - a home interface
proxyToString
protected java.lang.String proxyToString(java.lang.Object proxy)
- Returns a string representation for a proxy that uses this invocation
handler.
- Overrides:
proxyToString in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
invokeRemoteMethod
protected java.lang.Object invokeRemoteMethod(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object... args)
throws EJBInvocationHandlerException,
java.lang.Throwable
- Handles remote methods.
- Overrides:
invokeRemoteMethod in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
- Throws:
EJBInvocationHandlerException
java.lang.Throwable
checkInitialized
protected void checkInitialized()
throws EJBInvocationHandlerException
- Specified by:
checkInitialized in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
- Throws:
EJBInvocationHandlerException
getHandleMethodName
protected java.lang.String getHandleMethodName()
- Overrides:
getHandleMethodName in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
getHandle
protected EJBHomeHandle getHandle(org.ow2.carol.cmi.rpc.CMIProxy cmiProxy)
- Specified by:
getHandle in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
getCMIReferenceable
protected org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> getCMIReferenceable(org.ow2.carol.cmi.reference.CMIReference cmiReference)
throws java.lang.Exception
- Specified by:
getCMIReferenceable in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
- Throws:
java.lang.Exception
onExceptionHook
protected void onExceptionHook(java.lang.String objectName,
org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> cmiReferenceable)
- Specified by:
onExceptionHook in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
onFinallyHook
protected void onFinallyHook(java.lang.String objectName,
org.ow2.carol.cmi.reference.CMIReferenceable<javax.ejb.EJBHome> cmiReferenceable)
- Specified by:
onFinallyHook in class org.ow2.carol.cmi.rpc.CMIInvocationHandler<javax.ejb.EJBHome>
Copyright © 2008 OW2 Consortium. All Rights Reserved.