public class ConnectorsUtil extends Object
| Constructor and Description |
|---|
ConnectorsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
belongsToJdbcRA(String raName)
determine whether the RAR in question is a System RAR
|
static boolean |
belongsToSystemRA(String raName)
determine whether the RAR in question is a System RAR
|
static Map<String,String> |
convertPropertiesToMap(Properties properties) |
static String |
deriveJndiName(String name,
Hashtable env)
Given the name of the resource and its jndi env, derive the complete jndi name.
|
static String |
deriveResourceName(String compId,
String name,
org.glassfish.deployment.common.JavaEEResourceType resType) |
static String |
escapeResourceNameForMonitoring(String name) |
static boolean |
extractRar(String fileName,
String rarName,
String destDir)
GlassFish (Embedded) Uber jar will have .rar bundled in it.
|
static String |
getActualModuleName(String moduleName) |
static Collection<String> |
getAllPoolNames(Collection<ConnectorConnectionPool> connectionPools)
get the list of pool names
|
static Collection<ConnectorConnectionPool> |
getAllPoolsOfModule(String moduleName,
com.sun.enterprise.config.serverbeans.Resources allResources)
get the pools for a particular resource-adapter
|
static Collection<com.sun.enterprise.config.serverbeans.Resource> |
getAllResources(Collection<String> poolNames,
com.sun.enterprise.config.serverbeans.Resources allResources) |
static Collection<com.sun.enterprise.config.serverbeans.Resource> |
getAllSystemRAResourcesAndPools(com.sun.enterprise.config.serverbeans.Resources allResources)
Get all System RAR pools and resources
|
static Collection<WorkSecurityMap> |
getAllWorkSecurityMaps(com.sun.enterprise.config.serverbeans.Resources resources,
String moduleName) |
static String |
getApplicationName(org.glassfish.api.deployment.DeploymentContext context) |
static String |
getApplicationName(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo) |
static String |
getApplicationName(com.sun.enterprise.config.serverbeans.Resource resource) |
static String |
getApplicationNameOfEmbeddedRar(String embeddedRarName) |
static Map<String,String> |
getBuiltInCustomResources()
Provides the list of built in custom resources by
resource-type and factory-class-name pair.
|
static com.sun.enterprise.config.serverbeans.ResourcePool |
getConnectionPoolConfig(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo,
com.sun.enterprise.config.serverbeans.Resources allResources) |
static String |
getEmbeddedRarModuleName(String applicationName,
String moduleName) |
static List<URI> |
getInstalledLibrariesFromManifest(String moduleDirectory,
org.glassfish.api.admin.ServerEnvironment env) |
static String |
getLocation(String moduleName) |
static Set |
getMergedActivationConfigProperties(com.sun.enterprise.deployment.EjbMessageBeanDescriptor msgDesc)
Prepares the name/value pairs for ActivationSpec.
|
static String |
getModuleName(com.sun.enterprise.deployment.EjbDescriptor descriptor) |
static Collection<String> |
getNonJdbcSystemRars() |
static boolean |
getPingDuringPoolCreation(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo,
com.sun.enterprise.config.serverbeans.Resources allResources) |
static String |
getPMJndiName(String jndiName)
Return the system PM name for the JNDI name
|
static ConnectorConnectionPool |
getPool(Collection<com.sun.enterprise.config.serverbeans.Resource> configBeanResources,
String poolName) |
static org.glassfish.resourcebase.resources.api.PoolInfo |
getPoolInfo(com.sun.enterprise.config.serverbeans.ResourcePool resource) |
static String |
getPoolMonitoringSubTreeRoot(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo,
boolean escapeSlashes) |
static ResourceAdapterConfig |
getRAConfig(String raName,
com.sun.enterprise.config.serverbeans.Resources allResources) |
static String |
getRarNameFromApplication(String appName) |
static String |
getRarNameOfResource(com.sun.enterprise.config.serverbeans.Resource resource,
com.sun.enterprise.config.serverbeans.Resources resources) |
static String |
getReservePrefixedJNDINameForDescriptor(String moduleName) |
static String |
getReservePrefixedJNDINameForResource(String compId,
String resourceName,
org.glassfish.deployment.common.JavaEEResourceType resType) |
static String |
getResourceAdapterNameOfPool(String poolName,
com.sun.enterprise.config.serverbeans.Resources allResources)
Given the poolname, retrieve the resourceadapter name
|
static <T> com.sun.enterprise.config.serverbeans.Resource |
getResourceByName(com.sun.enterprise.config.serverbeans.Resources resources,
Class<T> type,
String name) |
static org.glassfish.resourcebase.resources.api.ResourceInfo |
getResourceInfo(com.sun.enterprise.config.serverbeans.BindableResource resource) |
static Collection<com.sun.enterprise.config.serverbeans.BindableResource> |
getResourcesOfPool(com.sun.enterprise.config.serverbeans.Resources resources,
String connectionPoolName) |
static long |
getShutdownTimeout(ConnectorService connectorService)
Gets the shutdown-timeout attribute from domain.xml
via the connector server config bean.
|
static String |
getSystemModuleLocation(String moduleName)
get the installation directory of System RARs
|
static Collection<String> |
getSystemRARs() |
static String |
getTransactionIsolationInt(int tranIsolation) |
static String |
getValidSuffix(String name)
check whether the jndi Name has connector related suffix and return if any.
|
static List<WorkSecurityMap> |
getWorkSecurityMaps(String raName,
com.sun.enterprise.config.serverbeans.Resources allResources)
given the ra-name, returns all the configured connector-work-security-maps for the .rar
|
static boolean |
isApplicationScopedResource(org.glassfish.resourcebase.resources.api.GenericResourceInfo resourceInfo) |
static boolean |
isDynamicReconfigurationEnabled(com.sun.enterprise.config.serverbeans.ResourcePool pool) |
static boolean |
isEmbedded(org.glassfish.api.deployment.DeploymentContext context) |
static org.glassfish.resourcebase.resources.api.ResourceConstants.TriState |
isEmbeddedRarResource(com.sun.enterprise.config.serverbeans.Resource configBeanResource,
Collection<com.sun.enterprise.config.serverbeans.Resource> configBeanResources) |
static boolean |
isJMSRA(String moduleName) |
static boolean |
isModuleScopedResource(org.glassfish.resourcebase.resources.api.GenericResourceInfo resourceInfo) |
static boolean |
isRARResource(com.sun.enterprise.config.serverbeans.Resource resource) |
static boolean |
isStandAloneRA(String moduleName) |
static boolean |
isValidJndiSuffix(String suffix)
If the suffix is one of the valid context return true.
|
static boolean |
parseBoolean(String enabled) |
static boolean |
systemRarExists(String location) |
public static boolean belongsToSystemRA(String raName)
raName - RarNamepublic static boolean getPingDuringPoolCreation(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo,
com.sun.enterprise.config.serverbeans.Resources allResources)
public static boolean belongsToJdbcRA(String raName)
raName - RarNamepublic static String getSystemModuleLocation(String moduleName)
moduleName - RARNamepublic static String getLocation(String moduleName) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic static String getPMJndiName(String jndiName)
jndiName - jndi namepublic static String getValidSuffix(String name)
name - jndi namepublic static boolean isValidJndiSuffix(String suffix)
suffix - __nontx / __pmpublic static String deriveJndiName(String name, Hashtable env)
name - name of the resourceenv - envpublic static com.sun.enterprise.config.serverbeans.ResourcePool getConnectionPoolConfig(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo,
com.sun.enterprise.config.serverbeans.Resources allResources)
public static Collection<com.sun.enterprise.config.serverbeans.Resource> getAllResources(Collection<String> poolNames, com.sun.enterprise.config.serverbeans.Resources allResources)
public static Collection<String> getAllPoolNames(Collection<ConnectorConnectionPool> connectionPools)
connectionPools - list of poolspublic static Collection<WorkSecurityMap> getAllWorkSecurityMaps(com.sun.enterprise.config.serverbeans.Resources resources, String moduleName)
public static Collection<ConnectorConnectionPool> getAllPoolsOfModule(String moduleName, com.sun.enterprise.config.serverbeans.Resources allResources)
moduleName - resource-adapter namepublic static Collection<com.sun.enterprise.config.serverbeans.Resource> getAllSystemRAResourcesAndPools(com.sun.enterprise.config.serverbeans.Resources allResources)
allResources - all configured resourcespublic static String getResourceAdapterNameOfPool(String poolName, com.sun.enterprise.config.serverbeans.Resources allResources)
poolName - connection pool nameallResources - resourcespublic static ResourceAdapterConfig getRAConfig(String raName, com.sun.enterprise.config.serverbeans.Resources allResources)
public static List<WorkSecurityMap> getWorkSecurityMaps(String raName, com.sun.enterprise.config.serverbeans.Resources allResources)
raName - resource-adapter nameallResources - resourcespublic static boolean isDynamicReconfigurationEnabled(com.sun.enterprise.config.serverbeans.ResourcePool pool)
public static Set getMergedActivationConfigProperties(com.sun.enterprise.deployment.EjbMessageBeanDescriptor msgDesc)
Rule:
1. The name/value pairs are the union of activation-config on standard DD (message-driven) and runtime DD (mdb-resource-adapter) 2. If there are duplicate property settings, the value in runtime activation-config will overwrite the one in the standard activation-config.
public static boolean isJMSRA(String moduleName)
public static boolean parseBoolean(String enabled)
public static long getShutdownTimeout(ConnectorService connectorService)
connectorService - connector-service configurationpublic static Map<String,String> getBuiltInCustomResources()
public static String getTransactionIsolationInt(int tranIsolation)
public static String deriveResourceName(String compId, String name, org.glassfish.deployment.common.JavaEEResourceType resType)
public static String getReservePrefixedJNDINameForResource(String compId, String resourceName, org.glassfish.deployment.common.JavaEEResourceType resType)
public static Map<String,String> convertPropertiesToMap(Properties properties)
public static String getEmbeddedRarModuleName(String applicationName, String moduleName)
public static String getApplicationNameOfEmbeddedRar(String embeddedRarName)
public static boolean isEmbedded(org.glassfish.api.deployment.DeploymentContext context)
public static String getApplicationName(org.glassfish.api.deployment.DeploymentContext context)
public static List<URI> getInstalledLibrariesFromManifest(String moduleDirectory, org.glassfish.api.admin.ServerEnvironment env) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic static String getReservePrefixedJNDINameForDescriptor(String moduleName)
public static boolean isStandAloneRA(String moduleName)
public static Collection<String> getSystemRARs()
public static Collection<String> getNonJdbcSystemRars()
public static boolean systemRarExists(String location)
public static boolean extractRar(String fileName, String rarName, String destDir)
fileName - rar-directory-namerarName - resource-adapter namedestDir - destination directorypublic static org.glassfish.resourcebase.resources.api.PoolInfo getPoolInfo(com.sun.enterprise.config.serverbeans.ResourcePool resource)
public static org.glassfish.resourcebase.resources.api.ResourceInfo getResourceInfo(com.sun.enterprise.config.serverbeans.BindableResource resource)
public static String getApplicationName(com.sun.enterprise.config.serverbeans.Resource resource)
public static String getApplicationName(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo)
public static boolean isApplicationScopedResource(org.glassfish.resourcebase.resources.api.GenericResourceInfo resourceInfo)
public static boolean isModuleScopedResource(org.glassfish.resourcebase.resources.api.GenericResourceInfo resourceInfo)
public static String getPoolMonitoringSubTreeRoot(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo, boolean escapeSlashes)
public static String getModuleName(com.sun.enterprise.deployment.EjbDescriptor descriptor)
public static Collection<com.sun.enterprise.config.serverbeans.BindableResource> getResourcesOfPool(com.sun.enterprise.config.serverbeans.Resources resources, String connectionPoolName)
public static <T> com.sun.enterprise.config.serverbeans.Resource getResourceByName(com.sun.enterprise.config.serverbeans.Resources resources,
Class<T> type,
String name)
public static org.glassfish.resourcebase.resources.api.ResourceConstants.TriState isEmbeddedRarResource(com.sun.enterprise.config.serverbeans.Resource configBeanResource,
Collection<com.sun.enterprise.config.serverbeans.Resource> configBeanResources)
public static ConnectorConnectionPool getPool(Collection<com.sun.enterprise.config.serverbeans.Resource> configBeanResources, String poolName)
public static boolean isRARResource(com.sun.enterprise.config.serverbeans.Resource resource)
public static String getRarNameOfResource(com.sun.enterprise.config.serverbeans.Resource resource, com.sun.enterprise.config.serverbeans.Resources resources)
Copyright © 2013. All Rights Reserved.