Class ConnectorService
- java.lang.Object
-
- com.sun.enterprise.connectors.service.ConnectorService
-
- All Implemented Interfaces:
ConnectorConstants
,ResourceConstants
- Direct Known Subclasses:
ConnectorAdminObjectAdminServiceImpl
,ConnectorConfigurationParserServiceImpl
,ConnectorConnectionPoolAdminServiceImpl
,ConnectorResourceAdminServiceImpl
,ConnectorSecurityAdminServiceImpl
,JdbcAdminServiceImpl
,ResourceAdapterAdminServiceImpl
public class ConnectorService extends Object implements ConnectorConstants
This is the base class for all the connector services. It defines the enviroment of execution (client or server), and holds the reference to connector runtime for inter service method invocations.- Author:
- Srikanth P
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.sun.appserv.connectors.internal.api.ConnectorConstants
ConnectorConstants.PoolType
-
Nested classes/interfaces inherited from interface org.glassfish.resourcebase.resources.api.ResourceConstants
ResourceConstants.TriState
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
_logger
protected static ConnectorRegistry
_registry
protected ConnectorRuntime
_runtime
-
Fields inherited from interface com.sun.appserv.connectors.internal.api.ConnectorConstants
ACCESS_ALL_RARS, ADMINISTERED_OBJECT_FACTORY, AIRA, AO, AOR, AORA, CAUTION_MESSAGE, CCP, CLASSLOADING_POLICY_DERIVED_ACCESS, CLASSLOADING_POLICY_GLOBAL_ACCESS, CONNECTOR_MESSAGE_BEAN_CLIENT_FACTORY, CONNECTOR_MODULE, CR, DD_PREFIX, DEFAULT_JMS_ADAPTER, DEFAULT_RESOURCE_ADAPTER_SHUTDOWN_TIMEOUT, DYNAMIC_RECONFIGURATION_FLAG, DYNAMIC_RECONFIGURATION_PROXY_CALL, EXPLODED_EMBEDDED_RAR_EXTENSION, HIDDEN_CLI_NAME_VALUE_PAIR_DELIMITER, INSTALL_ROOT, JAVA_BEAN_FACTORY_CLASS, JAVA_SQL_DRIVER, JAVAX_SQL_CONNECTION_POOL_DATASOURCE, JAVAX_SQL_DATASOURCE, JAVAX_SQL_XA_DATASOURCE, JAXR_RA_NAME, JDBC, JDBCCONNECTIONPOOLDATASOURCE_RA_NAME, JDBCDATASOURCE_RA_NAME, JDBCDRIVER_RA_NAME, jdbcSystemRarNames, JDBCXA_RA_NAME, JMS_POOL_MAXSIZE, JMS_POOL_MINSIZE, JNDI_SUFFIX_PROPERTY, JNDI_SUFFIX_VALUES, LOCAL_TRANSACTION_INT, LOCAL_TRANSACTION_TX_SUPPORT_STRING, MCF, MONITORING_CONNECTION_FACTORIES, MONITORING_CONNECTOR_SERVICE, MONITORING_CONNECTOR_SERVICE_MODULE_NAME, MONITORING_JMS_SERVICE, MONITORING_JMS_SERVICE_MODULE_NAME, MONITORING_SEPARATOR, MONITORING_WORK_MANAGEMENT, MSL, NO_TRANSACTION_INT, NO_TRANSACTION_TX_SUPPORT_STRING, NON_TX_JNDI_SUFFIX, PM_JNDI_SUFFIX, POOLNAME_APPENDER, POOLS_JNDINAME_PREFIX, PRIMITIVES_AND_STRING_FACTORY_CLASS, PROPERTIES_FACTORY, RA, RAR, RAR_EXTENSION, RAR_VISIBILITY, RAR_VISIBILITY_GLOBAL_ACCESS, REQUIRED_RARS_FOR_APP_PREFIX, RESERVE_PREFIX, RESOURCE_JNDINAME_PREFIX, RESOURCENAME_APPENDER, SEC, SECURITYMAPMETACHAR, SUN_RA_POOL, systemRarNames, systemRarsAllowingPoolCreation, sysThrowExcp, THROW_TRANSACTED_EXCEPTIONS, THROW_TRANSACTED_EXCEPTIONS_PROP, UNDEFINED_TRANSACTION_INT, URL_OBJECTS_FACTORY, USERGROUPDISTINGUISHER, XA_TRANSACTION_INT, XA_TRANSACTION_TX_SUPPORT_STRING
-
Fields inherited from interface org.glassfish.resourcebase.resources.api.ResourceConstants
ADMINISTERED_OBJECT_DEFINITION_JNDINAME_PREFIX, APP_META_DATA_RESOURCES, APP_SCOPED_RESOURCES_JNDI_NAMES, APP_SCOPED_RESOURCES_MAP, APP_SCOPED_RESOURCES_RA_NAMES, CONNECTION_FACTORY_DEFINITION_JNDINAME_PREFIX, CONNECTOR_RESOURCES, DATASOURCE_DEFINITION_JNDINAME_PREFIX, EMBEDDEDRAR_NAME_DELIMITER, EXT_JNDI_RES_TYPE, GF_RESOURCES_LOCATION, GF_RESOURCES_MODULE, GF_RESOURCES_MODULE_EAR, JAVA_APP_SCOPE_PREFIX, JAVA_COMP_ENV_SCOPE_PREFIX, JAVA_COMP_SCOPE_PREFIX, JAVA_GLOBAL_SCOPE_PREFIX, JAVA_MODULE_SCOPE_PREFIX, JAVA_SCOPE_PREFIX, JMS_CONNECTION_FACTORY_DEFINITION_JNDINAME_PREFIX, JMS_DESTINATION_DEFINITION_JNDINAME_PREFIX, JMS_MESSAGE_LISTENER, JMS_QUEUE, JMS_QUEUE_CONNECTION_FACTORY, JMS_TOPIC, JMS_TOPIC_CONNECTION_FACTORY, MAILSESSION_DEFINITION_JNDINAME_PREFIX, NON_CONNECTOR_RESOURCES, PAYARA_RESOURCES_LOCATION, PY_RESOURCES_MODULE, PY_RESOURCES_MODULE_EAR, RES_TYPE_AOR, RES_TYPE_CCP, RES_TYPE_CR, RES_TYPE_CUSTOM, RES_TYPE_CWSM, RES_TYPE_EXTERNAL_JNDI, RES_TYPE_JCP, RES_TYPE_JDBC, RES_TYPE_MAIL, RES_TYPE_RAC
-
-
Constructor Summary
Constructors Constructor Description ConnectorService()
Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkAccessibility(String rarName, ClassLoader loader)
Check whether ClassLoader is permitted to access this resource adapter.boolean
checkAndLoadPool(PoolInfo poolInfo)
void
createActiveResourceAdapterForEmbeddedRar(String rarModuleName)
ConnectorDescriptor
getConnectorDescriptor(String rarName)
Obtains the connector Descriptor pertaining to rar.String
getDefaultPoolName(String moduleName, String connectionDefName)
Returns the generated default connection poolName for a connection definition.String
getDefaultResourceName(String moduleName, String connectionDefName)
Returns the generated default connector resource for a connection definition.ResourcesUtil
getResourcesUtil()
void
ifSystemRarLoad(String rarName)
void
loadDeferredResourceAdapter(String rarModuleName)
void
loadDeferredResources(Resource[] resourcesToLoad)
boolean
loadResourcesAndItsRar(DeferredResourceConfig defResConfig)
void
switchOnMatching(String rarName, PoolInfo poolInfo)
Matching will be switched off in the pool, by default.
-
-
-
Field Detail
-
_logger
protected static final Logger _logger
-
_registry
protected static final ConnectorRegistry _registry
-
_runtime
protected ConnectorRuntime _runtime
-
-
Method Detail
-
getResourcesUtil
public ResourcesUtil getResourcesUtil()
-
getDefaultPoolName
public String getDefaultPoolName(String moduleName, String connectionDefName)
Returns the generated default connection poolName for a connection definition.- Parameters:
moduleName
- rar module nameconnectionDefName
- connection definition name- Returns:
- generated connection poolname
-
getDefaultResourceName
public String getDefaultResourceName(String moduleName, String connectionDefName)
Returns the generated default connector resource for a connection definition.- Parameters:
moduleName
- resource-adapter nameconnectionDefName
- connection definition name- Returns:
- generated default connector resource name
-
loadResourcesAndItsRar
public boolean loadResourcesAndItsRar(DeferredResourceConfig defResConfig)
-
loadDeferredResourceAdapter
public void loadDeferredResourceAdapter(String rarModuleName) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
createActiveResourceAdapterForEmbeddedRar
public void createActiveResourceAdapterForEmbeddedRar(String rarModuleName) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
loadDeferredResources
public void loadDeferredResources(Resource[] resourcesToLoad) throws Exception
- Throws:
Exception
-
getConnectorDescriptor
public ConnectorDescriptor getConnectorDescriptor(String rarName) throws ConnectorRuntimeException
Obtains the connector Descriptor pertaining to rar. If ConnectorDescriptor is present in registry, it is obtained from registry and returned. Else it is explicitly read from directory where rar is exploded.- Parameters:
rarName
- Name of the rar- Returns:
- ConnectorDescriptor pertaining to rar.
- Throws:
ConnectorRuntimeException
- when unable to get descriptor
-
switchOnMatching
public void switchOnMatching(String rarName, PoolInfo poolInfo)
Matching will be switched off in the pool, by default. This will be switched on if the connections with different resource principals reach the pool.- Parameters:
poolInfo
- Name of the pool to switchOn matching.rarName
- Name of the resource adater.
-
checkAndLoadPool
public boolean checkAndLoadPool(PoolInfo poolInfo)
-
ifSystemRarLoad
public void ifSystemRarLoad(String rarName) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
checkAccessibility
public boolean checkAccessibility(String rarName, ClassLoader loader)
Check whether ClassLoader is permitted to access this resource adapter. If the RAR is deployed and is not a standalone RAR, then only the ClassLoader that loaded the archive (any of its child) should be able to access it. Otherwise everybody can access the RAR.- Parameters:
rarName
- Resource adapter module name.loader
-ClassLoader
to verify.
-
-