/** * deploy proxy for the resource * @param resourceInfo jndi name with which the resource need to be deployed * @param resource config object of the resource */ public void deployResource(org.glassfish.resourcebase.resources.api.ResourceInfo resourceInfo, Resource resource){ try{ bindResource(resourceInfo, resource); }catch(NamingException ne){ Object[] params = {resourceInfo, ne}; logger.log(Level.SEVERE,ResourceLoggingConstansts.BIND_RESOURCE_FAILED, params); } }
if (Boolean.valueOf(ref.getEnabled()) && Boolean.valueOf(br.getEnabled())) { ResourceInfo resourceInfo = new ResourceInfo(br.getJndiName()); resourcesBinder.deployResource(resourceInfo, br);
if (bindableResourcesHelper.isBindableResourceEnabled(bindableResource)) { ResourceInfo resourceInfo = new ResourceInfo(bindableResource.getJndiName()); resourcesBinder.deployResource(resourceInfo, resource);
public void deployResources(String applicationName, String moduleName, Collection<com.sun.enterprise.config.serverbeans.Resource> resources, boolean postDeployPhase) throws Exception { for(Resource resource : resources){ if(resource instanceof BindableResource) { BindableResource bindableResource = (BindableResource)resource; ResourceInfo resourceInfo = new ResourceInfo(bindableResource.getJndiName(), applicationName, moduleName); if(getResourceDeployer(bindableResource).canDeploy(postDeployPhase, resources, bindableResource)){ resourcesBinder.deployResource(resourceInfo, bindableResource); } } else{ if(getResourceDeployer(resource).canDeploy(postDeployPhase, resources, resource)){ getResourceDeployer(resource).deployResource(resource, applicationName, moduleName); } } } }