Class ResourceAdapterAdminServiceImpl
- java.lang.Object
-
- com.sun.enterprise.connectors.service.ConnectorService
-
- com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl
-
- All Implemented Interfaces:
ConnectorConstants
,ResourceConstants
public class ResourceAdapterAdminServiceImpl extends ConnectorService
This is resource adapter admin service. It creates, deletes Resource adapter and also the resource adapter configuration updation.- Author:
- Binod P.G, Srikanth P, Aditya Gore, Jagadish Ramu
-
-
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 inherited from class com.sun.enterprise.connectors.service.ConnectorService
_logger, _registry, _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, CONCURRENT_JNDINAME_PREFIX, 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, CONCURRENT_CONTEXT_SERVICE_DEFINITION_JNDINAME_PREFIX, 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 ResourceAdapterAdminServiceImpl()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResourceAdapterConfig(String rarName, ResourceAdapterConfig raConfig)
add the resource-adapter-configvoid
associateResourceAdapter(String rarName, jakarta.resource.spi.ResourceAdapterAssociation raa)
associates the given instance of ResourceAdapterAssociation with the ResourceAdapter java-bean of the specified RARvoid
createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, String moduleName, String moduleDir, ClassLoader loader)
Creates Active resource Adapter which abstracts the rar module.void
createActiveResourceAdapter(String moduleDir, String moduleName, ClassLoader loader)
Creates Active resource Adapter which abstracts the rar module.void
deleteResourceAdapterConfig(String rarName)
Delete the resource adapter configuration to the connector registryboolean
isRarDeployed(String moduleName)
Checks if the rar module is already reployed.void
reCreateActiveResourceAdapter(String moduleName)
The ActiveResourceAdapter object which abstract the rar module is recreated in the connector container/registry.void
stopActiveResourceAdapter(String raName)
stop the active resource adapter (runtime)void
stopAllActiveResourceAdapters()
Calls the stop method for all J2EE Connector 1.5/1.0 spec compliant RARs-
Methods inherited from class com.sun.enterprise.connectors.service.ConnectorService
checkAccessibility, checkAndLoadPool, createActiveResourceAdapterForEmbeddedRar, getConnectorDescriptor, getDefaultPoolName, getDefaultResourceName, getResourcesUtil, ifSystemRarLoad, loadDeferredResourceAdapter, loadDeferredResources, loadResourcesAndItsRar, switchOnMatching
-
-
-
-
Method Detail
-
createActiveResourceAdapter
public void createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, String moduleName, String moduleDir, ClassLoader loader) throws ConnectorRuntimeException
Creates Active resource Adapter which abstracts the rar module. During the creation of ActiveResourceAdapter, default pools and resources also are created.- Parameters:
connectorDescriptor
- object which abstracts the connector deployment descriptor i.e rar.xml and sun-ra.xml.moduleName
- Name of the modulemoduleDir
- Directory where rar module is exploded.loader
- Classloader to use- Throws:
ConnectorRuntimeException
- if creation fails.
-
createActiveResourceAdapter
public void createActiveResourceAdapter(String moduleDir, String moduleName, ClassLoader loader) throws ConnectorRuntimeException
Creates Active resource Adapter which abstracts the rar module. During the creation of ActiveResourceAdapter, default pools and resources also are created.- Parameters:
moduleDir
- Directory where rar module is exploded.moduleName
- Name of the module- Throws:
ConnectorRuntimeException
- if creation fails.
-
associateResourceAdapter
public void associateResourceAdapter(String rarName, jakarta.resource.spi.ResourceAdapterAssociation raa) throws jakarta.resource.ResourceException
associates the given instance of ResourceAdapterAssociation with the ResourceAdapter java-bean of the specified RAR- Parameters:
rarName
- resource-adapter-nameraa
- Object that is an instance of ResourceAdapterAssociation- Throws:
jakarta.resource.ResourceException
- when unable to associate the RA Bean with RAA instance.
-
isRarDeployed
public boolean isRarDeployed(String moduleName)
Checks if the rar module is already reployed.- Parameters:
moduleName
- Rarmodule name- Returns:
- true if it is already deployed. false if it is not deployed.
-
stopAllActiveResourceAdapters
public void stopAllActiveResourceAdapters()
Calls the stop method for all J2EE Connector 1.5/1.0 spec compliant RARs
-
stopActiveResourceAdapter
public void stopActiveResourceAdapter(String raName)
stop the active resource adapter (runtime)- Parameters:
raName
- resource-adapter name
-
addResourceAdapterConfig
public void addResourceAdapterConfig(String rarName, ResourceAdapterConfig raConfig) throws ConnectorRuntimeException
add the resource-adapter-config- Parameters:
rarName
- resource-adapter nameraConfig
- resource-adapter-config- Throws:
ConnectorRuntimeException
-
deleteResourceAdapterConfig
public void deleteResourceAdapterConfig(String rarName) throws ConnectorRuntimeException
Delete the resource adapter configuration to the connector registry- Parameters:
rarName
- resource-adapter-name- Throws:
ConnectorRuntimeException
- when unable to remove RA Config.
-
reCreateActiveResourceAdapter
public void reCreateActiveResourceAdapter(String moduleName) throws ConnectorRuntimeException
The ActiveResourceAdapter object which abstract the rar module is recreated in the connector container/registry. All the pools and resources are killed. But the infrastructure to create the pools and and resources is untouched. Only the actual pool is killed.- Parameters:
moduleName
- rar module Name.- Throws:
ConnectorRuntimeException
- if recreation fails.
-
-