@Contract public interface ConnectorRuntime extends ConnectorConstants
ConnectorConstants.PoolType
ResourceConstants.TriState
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
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
Modifier and Type | Method and Description |
---|---|
void |
associateResourceAdapter(String rarName,
javax.resource.spi.ResourceAdapterAssociation raa)
associates the given instance of ResourceAdapterAssociation with
the ResourceAdapter java-bean of the specified RAR
|
void |
cleanUpResourcesAndShutdownAllActiveRAs()
Shut down all pools and active resource-adapters
|
void |
createActiveResourceAdapter(String sourcePath,
String moduleName,
ClassLoader loader)
Creates Active resource Adapter which abstracts the rar module.
|
void |
createActiveResourceAdapterForEmbeddedRar(String moduleName)
Creates Active resource Adapter which abstracts the rar module.
|
ClassLoader |
createConnectorClassLoader(String moduleDirectory,
ClassLoader parent,
String rarModuleName)
Given the module directory, creates a connector-class-finder (class-loader) for the module
|
void |
destroyActiveResourceAdapter(String moduleName)
Destroys/deletes the Active resource adapter object from the
connector container.
|
boolean |
flushConnectionPool(PoolInfo poolInfo)
Flush Connection pool by reinitializing the connections
established in the pool.
|
boolean |
flushConnectionPool(String poolName)
Flush Connection pool by reinitializing the connections
established in the pool.
|
String |
getActivationSpecClass(String rarName,
String messageListenerType)
Return the ActivationSpecClass name for given rar and messageListenerType
|
String[] |
getAdminObjectClassNames(String rarName,
String intfName)
Obtains all the Admin object implementation class names of the admin-object-interface for a rar
|
Map<String,String> |
getAdminObjectConfigProps(String rarName,
String adminObjectIntf)
Retrieves the admin object javabean properties with default values.
|
Map<String,String> |
getAdminObjectConfigProps(String rarName,
String adminObjectIntf,
String adminObjectClass)
Retrieves the admin object javabean properties with default values.
|
String[] |
getAdminObjectInterfaceNames(String rarName)
Obtains all the Admin object interface names of a rar
|
Map<String,String> |
getBuiltInCustomResources()
Provides the list of built in custom resources by
resource-type and factory-class-name pair.
|
CallbackHandler |
getCallbackHandler()
provides container's (application server's) callback handler
|
List<String> |
getConfidentialProperties(String rarName,
String type,
String... keyFields)
Retrieve the "confidential" config properties of specified artifact from a resource-adapter
|
String[] |
getConnectionDefinitionNames(String rarName)
Obtains all the Connection definition names of a rar
|
Map<String,Object> |
getConnectionDefinitionPropertiesAndDefaults(String connectionDefinitionClassName,
String resType)
Gets the properties of the Java bean connection definition class that
have setter methods defined and the default values as provided by the
Connection Definition java bean developer.
|
ResourcePool |
getConnectionPoolConfig(PoolInfo poolInfo)
Provide the configuration of the pool
|
ClassLoader |
getConnectorClassLoader()
provides connector class loader
|
Map<String,String> |
getConnectorConfigJavaBeans(String rarName,
String connectionDefName,
String type)
Retrieves the XXX javabean properties with default values.
|
ConnectorDescriptor |
getConnectorDescriptor(String rarName)
given a resource-adapter name, retrieves the connector-descriptor
either from runtime's registry or by reading the descriptor from
deployment location.
|
Set<String> |
getDatabaseVendorNames()
Get jdbc database vendor names list.
|
ProcessEnvironment.ProcessType |
getEnvironment()
Indicates whether the execution environment is server or client
|
InvocationManager |
getInvocationManager()
provides the invocationManager
|
Set<String> |
getJdbcDriverClassNames(String dbVendor,
String resType)
Fetch the DataSource/Driver implementation class names for a particular
dbVendor and resource type.
|
Set<String> |
getJdbcDriverClassNames(String dbVendor,
String resType,
boolean introspect)
Fetch the DataSource/Driver implementation class names for a particular
dbVendor and resource type.
|
Map<String,String> |
getMCFConfigProps(String rarName,
String connectionDefName)
Retrieves the MCF javabean properties with default values.
|
Map<String,String> |
getMessageListenerConfigProps(String rarName,
String messageListenerType)
Parses the ra.xml for the ActivationSpec javabean
properties and processes annotations if any.
|
Map<String,String> |
getMessageListenerConfigPropTypes(String rarName,
String messageListenerType)
Returns the Properties object consisting of propertyname as the
key and datatype as the value.
|
String[] |
getMessageListenerTypes(String rarName)
Parses the ra.xml, processes the annotated rar artificats if any
and returns all the Message listener types.
|
boolean |
getPingDuringPoolCreation(PoolInfo poolInfo)
Check if Ping attribute is on during pool creation.
|
Map<String,String> |
getResourceAdapterConfigProps(String rarName)
Retrieves the Resource adapter javabean properties with default values.
|
Set |
getResourceReferenceDescriptor()
get resource reference descriptors from current component's jndi environment
|
String |
getSecurityPermissionSpec(String moduleName)
Obtains the Permission string that needs to be added to the
to the security policy files.
|
long |
getShutdownTimeout()
Gets the shutdown-timeout attribute configured in
connector-service |
String[] |
getSystemConnectorsAllowingPoolCreation()
Returns the system RAR names that allow pool creation
|
JavaEETransactionManager |
getTransactionManager()
provides the transactionManager
|
List<WorkSecurityMap> |
getWorkSecurityMap(String raName)
get work security maps for a resource-adapter-name
|
boolean |
hasAdminObject(String rarName,
String intfName,
String className)
checks whether the specified intfName, className has presence in
admin objects of the RAR
|
boolean |
isEmbedded()
Checks whether the executing environment is embedded runtime
|
boolean |
isServer()
Checks whether the executing environment is application server
|
Object |
lookupNonTxResource(ResourceInfo resourceInfo,
boolean force)
Does lookup of non-tx-datasource.
|
Object |
lookupNonTxResource(String jndiName,
boolean force)
Does lookup of non-tx-datasource.
|
Object |
lookupPMResource(ResourceInfo resourceInfo,
boolean force)
Does lookup of "__pm" datasource.
|
Object |
lookupPMResource(String jndiName,
boolean force)
Does lookup of "__pm" datasource.
|
javax.resource.spi.ManagedConnectionFactory |
obtainManagedConnectionFactory(PoolInfo poolInfo)
Returns the MCF instance.
|
javax.resource.spi.ManagedConnectionFactory |
obtainManagedConnectionFactory(PoolInfo poolInfo,
Hashtable env)
provide the MCF of the pool (either retrieve or create)
|
boolean |
pingConnectionPool(PoolInfo poolInfo)
Tests whether the configuration for the pool is valid by making a connection.
|
void |
registerConnectorNamingEventListener(ConnectorNamingEventListener listener)
register the connector naming event listener
|
void |
registerDataSourceDefinitions(Application application)
Used to register data-source-definitions at an earlier stage of deployment (prepare phase).
|
void |
shutdownAllActiveResourceAdapters()
Shut down all active resource adapters
|
void |
unregisterConnectorNamingEventListener(ConnectorNamingEventListener listener)
unregister the connector naming event listner
|
void |
unRegisterDataSourceDefinitions(Application application)
Used to unRegister data-source-definitions at an later stage of undeploy operation.
|
void createActiveResourceAdapter(String sourcePath, String moduleName, ClassLoader loader) throws ConnectorRuntimeException
sourcePath
- Directory where rar module is exploded.moduleName
- Name of the moduleloader
- Classloader used to load the .rarConnectorRuntimeException
- if creation fails.void createActiveResourceAdapterForEmbeddedRar(String moduleName) throws ConnectorRuntimeException
moduleName
- Name of the moduleConnectorRuntimeException
- if creation fails.void destroyActiveResourceAdapter(String moduleName) throws ConnectorRuntimeException
moduleName
- Name of the rarModule to destroy/deleteConnectorRuntimeException
- if the deletion failsvoid cleanUpResourcesAndShutdownAllActiveRAs()
void shutdownAllActiveResourceAdapters()
ClassLoader createConnectorClassLoader(String moduleDirectory, ClassLoader parent, String rarModuleName) throws ConnectorRuntimeException
moduleDirectory
- rar module directory for which classloader is neededparent
- parent classloaderConnectorRuntimeException
- when unable to create classloaderObject lookupNonTxResource(String jndiName, boolean force) throws NamingException
jndiName
- jndi name of the resourceforce
- provide the resource (in DAS) even if it is not enabled in DASNamingException
- when not able to get the datasource.Object lookupPMResource(String jndiName, boolean force) throws NamingException
jndiName
- jndi name of the resourceforce
- provide the resource (in DAS) even if it is not enabled in DASNamingException
- when not able to get the datasource.Object lookupNonTxResource(ResourceInfo resourceInfo, boolean force) throws NamingException
resourceInfo
- jndi name of the resourceforce
- provide the resource (in DAS) even if it is not enabled in DASNamingException
- when not able to get the datasource.Object lookupPMResource(ResourceInfo resourceInfo, boolean force) throws NamingException
resourceInfo
- jndi name of the resourceforce
- provide the resource (in DAS) even if it is not enabled in DASNamingException
- when not able to get the datasource.void registerConnectorNamingEventListener(ConnectorNamingEventListener listener)
listener
- connector-naming-event-listenervoid unregisterConnectorNamingEventListener(ConnectorNamingEventListener listener)
listener
- connector-naming-event-listenerResourcePool getConnectionPoolConfig(PoolInfo poolInfo)
PoolInfo
- connection pool infoboolean pingConnectionPool(PoolInfo poolInfo) throws javax.resource.ResourceException
PoolInfo
- connection pool info.javax.resource.ResourceException
- when unable to pingJavaEETransactionManager getTransactionManager()
InvocationManager getInvocationManager()
Set getResourceReferenceDescriptor()
javax.resource.spi.ManagedConnectionFactory obtainManagedConnectionFactory(PoolInfo poolInfo) throws ConnectorRuntimeException
PoolInfo
- Name of the pool.MCF pertaining to this pool is
created/returned.ConnectorRuntimeException
- if creation/retrieval of MCF failsjavax.resource.spi.ManagedConnectionFactory obtainManagedConnectionFactory(PoolInfo poolInfo, Hashtable env) throws ConnectorRuntimeException
poolName
- connection pool nameenv
- Environment entries to use for lookupConnectorRuntimeException
- when unable to provide the MCFProcessEnvironment.ProcessType getEnvironment()
CallbackHandler getCallbackHandler()
boolean isServer()
boolean isEmbedded()
ClassLoader getConnectorClassLoader()
Map<String,Object> getConnectionDefinitionPropertiesAndDefaults(String connectionDefinitionClassName, String resType)
connectionDefinitionClassName
- The Connection Definition Java bean class for which
overrideable properties are required.resType
- resource-typeMap<String,String> getBuiltInCustomResources()
String[] getSystemConnectorsAllowingPoolCreation()
String[] getConnectionDefinitionNames(String rarName) throws ConnectorRuntimeException
rarName
- rar moduleNameConnectorRuntimeException
- when unable to obtain connection definition from descriptor.String getSecurityPermissionSpec(String moduleName) throws ConnectorRuntimeException
moduleName
- rar module NameConnectorRuntimeException
- If rar.xml parsing or annotation processing fails.String[] getAdminObjectInterfaceNames(String rarName) throws ConnectorRuntimeException
rarName
- rar moduleNameConnectorRuntimeException
- when unable to obtain admin object interface namesString[] getAdminObjectClassNames(String rarName, String intfName) throws ConnectorRuntimeException
rarName
- rar moduleNameintfName
- admin-object-interface-nameConnectorRuntimeException
- when unable to obtain admin object interface namesboolean hasAdminObject(String rarName, String intfName, String className) throws ConnectorRuntimeException
rarName
- resource-adapter nameintfName
- admin object interface nameclassName
- admin object class nameConnectorRuntimeException
- when unable to determine the presenceMap<String,String> getResourceAdapterConfigProps(String rarName) throws ConnectorRuntimeException
rarName
- rar module nameConnectorRuntimeException
- if property retrieval fails.Map<String,String> getMCFConfigProps(String rarName, String connectionDefName) throws ConnectorRuntimeException
rarName
- rar module nameconnectionDefName
- connection-definition-nameConnectorRuntimeException
- if property retrieval fails.Map<String,String> getAdminObjectConfigProps(String rarName, String adminObjectIntf) throws ConnectorRuntimeException
rarName
- rar module nameadminObjectIntf
- admin-object-interface nameConnectorRuntimeException
- if property retrieval fails.Map<String,String> getAdminObjectConfigProps(String rarName, String adminObjectIntf, String adminObjectClass) throws ConnectorRuntimeException
rarName
- rar module nameadminObjectIntf
- admin-object-interface nameadminObjectClass
- admin-object-class nameConnectorRuntimeException
- if property retrieval fails.Map<String,String> getConnectorConfigJavaBeans(String rarName, String connectionDefName, String type) throws ConnectorRuntimeException
rarName
- rar module nameconnectionDefName
- connection definition nametype
- JavaBean type to introspectConnectorRuntimeException
- if property retrieval fails.String getActivationSpecClass(String rarName, String messageListenerType) throws ConnectorRuntimeException
rarName
- name of the rar modulemessageListenerType
- MessageListener typeConnectorRuntimeException
- If moduleDir is null.
If corresponding rar is not deployed.String[] getMessageListenerTypes(String rarName) throws ConnectorRuntimeException
rarName
- name of the rar module.ConnectorRuntimeException
- If moduleDir is null.
If corresponding rar is not deployed.Map<String,String> getMessageListenerConfigProps(String rarName, String messageListenerType) throws ConnectorRuntimeException
rarName
- name of the rar module.messageListenerType
- message listener type.It is uniqie
across all ConnectorRuntimeException
- if either of the parameters are null.
If corresponding rar is not deployed i.e moduleDir is invalid.
If messagelistener type is not found in ra.xml or could not be
found in annotations if anyMap<String,String> getMessageListenerConfigPropTypes(String rarName, String messageListenerType) throws ConnectorRuntimeException
rarName
- name of the rar module.messageListenerType
- message listener type.It is uniqie
across all ConnectorRuntimeException
- if either of the parameters are null.
If corresponding rar is not deployed i.e moduleDir is invalid.
If messagelistener type is not found in ra.xmlor could not be found
in annotations if anyList<WorkSecurityMap> getWorkSecurityMap(String raName)
raName
- resource-adapter namevoid registerDataSourceDefinitions(Application application)
application
- Application being deployed.void unRegisterDataSourceDefinitions(Application application)
application
- Application being undeployed.boolean flushConnectionPool(PoolInfo poolInfo) throws ConnectorRuntimeException
PoolInfo
- connection pool infoConnectorRuntimeException
boolean flushConnectionPool(String poolName) throws ConnectorRuntimeException
PoolInfo
- connection pool infoConnectorRuntimeException
Set<String> getJdbcDriverClassNames(String dbVendor, String resType)
dbVendor
- database vendor nameresType
- resource-type Set<String> getJdbcDriverClassNames(String dbVendor, String resType, boolean introspect)
dbVendor
- database vendor nameresType
- resource-typeintrospect
- (javax.sql.DataSource/javax.sql.ConnectionPoolDataSource/javax.sql.XADataSource/java.sql.Driver)boolean getPingDuringPoolCreation(PoolInfo poolInfo)
PoolInfo
- connection pool infoConnectorDescriptor getConnectorDescriptor(String rarName) throws ConnectorRuntimeException
rarName
- resource-adapter-nameConnectorRuntimeException
- when unable to provide the descriptorSet<String> getDatabaseVendorNames()
void associateResourceAdapter(String rarName, javax.resource.spi.ResourceAdapterAssociation raa) throws javax.resource.ResourceException
rarName
- resource-adapter-nameraa
- Object that is an instance of ResourceAdapterAssociationjavax.resource.ResourceException
- when unable to associate the RA Bean with RAA instance.long getShutdownTimeout()
connector-service
List<String> getConfidentialProperties(String rarName, String type, String... keyFields) throws ConnectorRuntimeException
rarName
- resource-adapter nametype
- indicates the artifact type. Valid values are : ConnectorConstants.AOR, RA, MCF, MSLkeyFields
- var-args list of key fields.
eg: connection-definition-name whenConnectorRuntimeException
Copyright © 2020. All rights reserved.