Class ResourcesUtil
- java.lang.Object
-
- com.sun.enterprise.connectors.util.ResourcesUtil
-
public class ResourcesUtil extends Object
-
-
Method Summary
-
-
-
Method Detail
-
getGlobalResources
public Resources getGlobalResources()
-
getResources
public Resources getResources(ResourceInfo resourceInfo)
-
getApplicationDeployLocation
public String getApplicationDeployLocation(String appName)
Gets the deployment location for a J2EE application.- Parameters:
appName
- application name- Returns:
- application deploy location
-
belongToStandAloneRar
public boolean belongToStandAloneRar(String resourceAdapterName)
-
createInstance
public static ResourcesUtil createInstance()
-
getDeferredResourceConfig
public DeferredResourceConfig getDeferredResourceConfig(Object resource, Object pool, String resType, String raName) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
getCorrespondingCmpResourceName
protected String getCorrespondingCmpResourceName(ResourceInfo resourceInfo)
Returns the deferred admin object config. This can be admin object of JMS RA which is lazily loaded. Or for other connector RA which is not loaded at start-up. The connector RA which does not have any resource or admin object associated with it are not loaded at start-up. They are all lazily loaded.
-
isReferenced
public boolean isReferenced(ResourceInfo resourceInfo)
Returns true if the given resource is referenced by this server.- Parameters:
resourceInfo
- the name of the resource- Returns:
- true if the named resource is used/referred by this server
-
isEnabled
public boolean isEnabled(Application application)
-
isEnabled
public boolean isEnabled(Resource resource)
Checks if a Resource is enabled. Since 8.1 PE/SE/EE, A resource [except resource adapter configs, connector and JDBC connection pools which are global and hence enabled always] is enabled only when the resource is enabled and there exists a resource ref to this resource in this server instance and that resource ref is enabled. Before a resource is loaded or deployed, it is checked to see if it is enabled.- Since:
- 8.1 PE/SE/EE
-
isEnabled
public boolean isEnabled(ResourcePool pool)
-
isEnabled
public boolean isEnabled(BindableResource br, ResourceInfo resourceInfo)
-
isEnabled
public boolean isEnabled(BindableResource br)
-
getEnabledAdminObjectResources
public Collection<AdminObjectResource> getEnabledAdminObjectResources(String raName)
-
getEnabledAdminObjectResources
public Collection<AdminObjectResource> getEnabledAdminObjectResources(String raName, Resources resources)
-
getResourceType
public String getResourceType(ConfigBeanProxy cb)
Gets a JDBC resource on the basis of its jndi name- Parameters:
jndiName
- the jndi name of the JDBC resource to lookupcheckReference
- if true, returns this JDBC resource only if it is referenced in this server. If false, returns the JDBC resource irrespective of whether it is referenced or not.- Returns:
- JdbcResource resource
-
getConnectorDescriptorFromUri
public ConnectorDescriptor getConnectorDescriptorFromUri(String rarName, String raLoc)
-
isPoolReferredInServerInstance
public boolean isPoolReferredInServerInstance(PoolInfo poolInfo)
Determines if a connector connection pool is referred in a server-instance via resource-refs- Parameters:
poolInfo
- pool-name- Returns:
- boolean true if pool is referred in this server instance as well enabled, false otherwise
-
getPoolConfig
public ResourcePool getPoolConfig(PoolInfo poolInfo)
-
getConnectorConnectionPoolOfResource
public ConnectorConnectionPool getConnectorConnectionPoolOfResource(ResourceInfo resourceInfo)
-
isRARResource
public boolean isRARResource(Resource resource)
-
getResource
public Resource getResource(ResourceInfo resourceInfo, Class resourceType)
-
getResource
public Resource getResource(String jndiName, String appName, String moduleName, Class resourceType)
-
filterConnectorResources
public Collection<Resource> filterConnectorResources(Resources allResources, String moduleName, boolean includePools)
-
-