Class ResourceProxy
- java.lang.Object
-
- org.glassfish.resourcebase.resources.api.ResourceProxy
-
- All Implemented Interfaces:
NamingObjectProxy
,NamingObjectProxy.InitializationNamingObjectProxy
@Service @PerLookup public class ResourceProxy extends Object implements NamingObjectProxy.InitializationNamingObjectProxy
Represents the proxy object for a resource. Proxy will be bound in jndi during startup and the actual resource will be deployed during first lookup- Author:
- Jagadish Ramu
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.naming.NamingObjectProxy
NamingObjectProxy.InitializationNamingObjectProxy
-
-
Constructor Summary
Constructors Constructor Description ResourceProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
create(Context ic)
Create and return an object.protected ResourceDeployer
getResourceDeployer(Object resource)
Given a resource instance, appropriate deployer will be providedvoid
setResource(Resource resource)
Set the resource config bean instancevoid
setResourceInfo(ResourceInfo resourceInfo)
Name by which the proxy (or the resource) will be bound in JNDIprotected Object
throwResourceNotFoundException(Exception e, ResourceInfo resourceInfo)
-
-
-
Method Detail
-
create
public Object create(Context ic) throws NamingException
Description copied from interface:NamingObjectProxy
Create and return an object.- Specified by:
create
in interfaceNamingObjectProxy
- Returns:
- an object
- Throws:
NamingException
-
setResource
public void setResource(Resource resource)
Set the resource config bean instance- Parameters:
resource
- config bean
-
setResourceInfo
public void setResourceInfo(ResourceInfo resourceInfo)
Name by which the proxy (or the resource) will be bound in JNDI- Parameters:
resourceInfo
- resource-info
-
throwResourceNotFoundException
protected Object throwResourceNotFoundException(Exception e, ResourceInfo resourceInfo) throws NamingException
- Throws:
NamingException
-
getResourceDeployer
protected ResourceDeployer getResourceDeployer(Object resource)
Given a resource instance, appropriate deployer will be provided- Parameters:
resource
- resource instance- Returns:
- ResourceDeployer
-
-