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,
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,
Resources allResources)
get the pools for a particular resource-adapter
|
static Collection<Resource> |
getAllResources(Collection<String> poolNames,
Resources allResources) |
static Collection<Resource> |
getAllSystemRAResourcesAndPools(Resources allResources)
Get all System RAR pools and resources
|
static Collection<WorkSecurityMap> |
getAllWorkSecurityMaps(Resources resources,
String moduleName) |
static String |
getApplicationName(DeploymentContext context) |
static String |
getApplicationName(PoolInfo poolInfo) |
static String |
getApplicationName(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 ResourcePool |
getConnectionPoolConfig(PoolInfo poolInfo,
Resources allResources) |
static String |
getEmbeddedRarModuleName(String applicationName,
String moduleName) |
static List<URI> |
getInstalledLibrariesFromManifest(String moduleDirectory,
ServerEnvironment env) |
static String |
getLocation(String moduleName) |
static Set |
getMergedActivationConfigProperties(EjbMessageBeanDescriptor msgDesc)
Prepares the name/value pairs for ActivationSpec.
|
static String |
getModuleName(EjbDescriptor descriptor) |
static Collection<String> |
getNonJdbcSystemRars() |
static boolean |
getPingDuringPoolCreation(PoolInfo poolInfo,
Resources allResources) |
static String |
getPMJndiName(String jndiName)
Return the system PM name for the JNDI name
|
static ConnectorConnectionPool |
getPool(Collection<Resource> configBeanResources,
String poolName) |
static PoolInfo |
getPoolInfo(ResourcePool resource) |
static String |
getPoolMonitoringSubTreeRoot(PoolInfo poolInfo,
boolean escapeSlashes) |
static ResourceAdapterConfig |
getRAConfig(String raName,
Resources allResources) |
static String |
getRarNameFromApplication(String appName) |
static String |
getRarNameOfResource(Resource resource,
Resources resources) |
static String |
getReservePrefixedJNDINameForDescriptor(String moduleName) |
static String |
getReservePrefixedJNDINameForResource(String compId,
String resourceName,
JavaEEResourceType resType) |
static String |
getResourceAdapterNameOfPool(String poolName,
Resources allResources)
Given the poolname, retrieve the resourceadapter name
|
static <T> Resource |
getResourceByName(Resources resources,
Class<T> type,
String name) |
static ResourceInfo |
getResourceInfo(BindableResource resource) |
static Collection<BindableResource> |
getResourcesOfPool(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,
Resources allResources)
given the ra-name, returns all the configured connector-work-security-maps for the .rar
|
static boolean |
isApplicationScopedResource(GenericResourceInfo resourceInfo) |
static boolean |
isDynamicReconfigurationEnabled(ResourcePool pool) |
static boolean |
isEmbedded(DeploymentContext context) |
static ResourceConstants.TriState |
isEmbeddedRarResource(Resource configBeanResource,
Collection<Resource> configBeanResources) |
static boolean |
isJMSRA(String moduleName) |
static boolean |
isModuleScopedResource(GenericResourceInfo resourceInfo) |
static boolean |
isRARResource(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(PoolInfo poolInfo, Resources allResources)
public static boolean belongsToJdbcRA(String raName)
raName
- RarNamepublic static String getSystemModuleLocation(String moduleName)
moduleName
- RARNamepublic static String getLocation(String moduleName) throws ConnectorRuntimeException
ConnectorRuntimeException
public 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 ResourcePool getConnectionPoolConfig(PoolInfo poolInfo, Resources allResources)
public static Collection<Resource> getAllResources(Collection<String> poolNames, Resources allResources)
public static Collection<String> getAllPoolNames(Collection<ConnectorConnectionPool> connectionPools)
connectionPools
- list of poolspublic static Collection<WorkSecurityMap> getAllWorkSecurityMaps(Resources resources, String moduleName)
public static Collection<ConnectorConnectionPool> getAllPoolsOfModule(String moduleName, Resources allResources)
moduleName
- resource-adapter namepublic static Collection<Resource> getAllSystemRAResourcesAndPools(Resources allResources)
allResources
- all configured resourcespublic static String getResourceAdapterNameOfPool(String poolName, Resources allResources)
poolName
- connection pool nameallResources
- resourcespublic static List<WorkSecurityMap> getWorkSecurityMaps(String raName, Resources allResources)
raName
- resource-adapter nameallResources
- resourcespublic static boolean isDynamicReconfigurationEnabled(ResourcePool pool)
public static Set getMergedActivationConfigProperties(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, JavaEEResourceType resType)
public static String getReservePrefixedJNDINameForResource(String compId, String resourceName, 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(DeploymentContext context)
public static String getApplicationName(DeploymentContext context)
public static List<URI> getInstalledLibrariesFromManifest(String moduleDirectory, ServerEnvironment env) throws ConnectorRuntimeException
ConnectorRuntimeException
public 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 PoolInfo getPoolInfo(ResourcePool resource)
public static ResourceInfo getResourceInfo(BindableResource resource)
public static boolean isApplicationScopedResource(GenericResourceInfo resourceInfo)
public static boolean isModuleScopedResource(GenericResourceInfo resourceInfo)
public static String getPoolMonitoringSubTreeRoot(PoolInfo poolInfo, boolean escapeSlashes)
public static String getModuleName(EjbDescriptor descriptor)
public static Collection<BindableResource> getResourcesOfPool(Resources resources, String connectionPoolName)
public static <T> Resource getResourceByName(Resources resources, Class<T> type, String name)
public static ResourceConstants.TriState isEmbeddedRarResource(Resource configBeanResource, Collection<Resource> configBeanResources)
public static ConnectorConnectionPool getPool(Collection<Resource> configBeanResources, String poolName)
public static boolean isRARResource(Resource resource)
Copyright © 2018. All rights reserved.