org.glassfish.javaee.services
Class ResourceProxy
java.lang.Object
org.glassfish.javaee.services.ResourceProxy
- All Implemented Interfaces:
- NamingObjectProxy, NamingObjectProxy.InitializationNamingObjectProxy
@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceProxy
public ResourceProxy()
create
public Object create(Context ic)
throws NamingException
- Specified by:
create in interface NamingObjectProxy
- 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
Copyright © 2012 GlassFish Community. All Rights Reserved.