org.apache.webbeans.proxy
Class ResourceProxyHandler
java.lang.Object
org.apache.webbeans.proxy.ResourceProxyHandler
- All Implemented Interfaces:
- Externalizable, Serializable, javassist.util.proxy.MethodHandler
public class ResourceProxyHandler
- extends Object
- implements javassist.util.proxy.MethodHandler, Serializable, Externalizable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceProxyHandler
public ResourceProxyHandler()
ResourceProxyHandler
public ResourceProxyHandler(ResourceBean bean,
Object actualResource)
invoke
public Object invoke(Object self,
Method actualMethod,
Method proceed,
Object[] args)
throws Throwable
- Specified by:
invoke in interface javassist.util.proxy.MethodHandler
- Throws:
Throwable
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- When serialized, first try container provided failover service. If the failover service
does not handle the actual instance, the default behavior is:
1. If actual object is serializable, then serialize it directly.
2. If not, serialize the DUMMY_STRING.
- Specified by:
writeExternal in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- When deserialized, first try container provided failover service. If the failover service does not
handle the actual instance, the default behavior is:
1. Read the object from the stream,
2. If the object is renote ejb stub, reconnect it.
3. if the object is DUMMY_STRING, invoke ResourceBean.getActualInstance to get a new instance of the resource.
- Specified by:
readExternal in interface Externalizable
- Throws:
IOException
ClassNotFoundException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.