@Service @Singleton public class ConnectorRuntime extends Object implements ConnectorRuntime, org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroy
ConnectorConstants.PoolTypeResourceConstants.TriStateACCESS_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_STRINGADMINISTERED_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, 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 and Description |
|---|
ConnectorRuntime()
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdminObject(String appName,
String connectorName,
ResourceInfo resourceInfo,
String adminObjectType,
String adminObjectClassName,
Properties props) |
void |
addResourceAdapterConfig(String rarName,
ResourceAdapterConfig raConfig)
Add the resource adapter configuration to the connector registry
|
void |
associateResourceAdapter(String rarName,
javax.resource.spi.ResourceAdapterAssociation raa)
associates the given instance of ResourceAdapterAssociation with
the ResourceAdapter java-bean of the specified RAR
|
boolean |
checkAccessibility(String rarName,
ClassLoader loader)
Check whether ClassLoader is permitted to access this resource adapter.
|
void |
cleanUpResourcesAndShutdownAllActiveRAs()
Shut down all pools and active resource-adapters
|
void |
createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor,
String moduleName,
String moduleDir)
Creates Active resource Adapter which abstracts the rar module.
|
void |
createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor,
String moduleName,
String moduleDir,
ClassLoader loader) |
void |
createActiveResourceAdapter(String moduleDir,
String moduleName,
ClassLoader loader)
Creates Active resource Adapter which abstracts the rar module.
|
void |
createActiveResourceAdapterForEmbeddedRar(String rarModuleName)
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 |
createConnectorConnectionPool(ConnectorConnectionPool connectorPoolObj)
Creates connector connection pool in the connector container.
|
void |
createConnectorConnectionPool(ConnectorConnectionPool ccp,
String connectionDefinitionName,
String rarName,
List<org.jvnet.hk2.config.types.Property> props,
List<SecurityMap> securityMaps)
Creates connector connection pool in the connector container.
|
void |
createConnectorResource(ResourceInfo resourceInfo,
PoolInfo poolInfo,
String resourceType)
Creates the connector resource on a given connection pool
|
void |
deleteAdminObject(ResourceInfo resourceInfo) |
void |
deleteConnectorConnectionPool(PoolInfo poolInfo)
Deletes connector Connection pool
|
void |
deleteConnectorResource(ResourceInfo resourceInfo)
Deletes the connector resource.
|
void |
deleteResourceAdapterConfig(String rarName)
Delete the resource adapter configuration to the connector registry
|
void |
deployResourcesOfModule(String rarName)
deploy resources of 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
|
ActiveRAFactory |
getActiveRAFactory() |
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
|
ApplicationArchivist |
getApplicationArchivist() |
Applications |
getApplications() |
ApplicationRegistry |
getAppRegistry() |
AuthenticationService |
getAuthenticationService(String rarName,
PoolInfo poolInfo)
Obtain the authentication service associated with rar module.
|
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
|
ClassLoaderHierarchy |
getClassLoaderHierarchy() |
ComponentEnvManager |
getComponentEnvManager() |
List<String> |
getConfidentialProperties(String rarName,
String type,
String... keyFields)
Retrieve the "confidential" config properties of specified artifact from a resource-adapter
|
Connection |
getConnection(ResourceInfo resourceInfo)
Get a sql connection from the DataSource specified by the jdbcJndiName.
|
Connection |
getConnection(ResourceInfo resourceInfo,
String user,
String password)
Get a sql connection from the DataSource specified by the jdbcJndiName.
|
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
|
ConnectorArchivist |
getConnectorArchvist() |
ConnectorJavaBeanValidator |
getConnectorBeanValidator()
returns the bean validator that can be used to validate various connector bean artifacts
(ResourceAdapter, ManagedConnetionFactory, AdministeredObject, ActivationSpec)
|
DelegatingClassLoader |
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)
Obtains the connector Descriptor pertaining to rar.
|
Set<String> |
getDatabaseVendorNames()
Get jdbc database vendor names list.
|
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.
|
Domain |
getDomain() |
ProcessEnvironment.ProcessType |
getEnvironment()
Returns the execution environment.
|
FileArchive |
getFileArchive() |
ResourceManager |
getGlobalResourceManager() |
InvocationManager |
getInvocationManager()
provides the invocationManager
|
Set<String> |
getJdbcDriverClassNames(String dbVendor,
String resType)
Get jdbc driver implementation class names list for the dbVendor and
resource type supplied.
|
Set<String> |
getJdbcDriverClassNames(String dbVendor,
String resType,
boolean introspect)
Get jdbc driver implementation class names list for the dbVendor and
resource type supplied.
|
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.
|
MonitoringBootstrap |
getMonitoringBootstrap() |
GlassfishNamingManager |
getNamingManager() |
boolean |
getPingDuringPoolCreation(PoolInfo poolInfo)
Check if ping is on during pool creation.
|
PoolManager |
getPoolManager() |
ConnectorConstants.PoolType |
getPoolType(PoolInfo poolInfo) |
ConnectionPoolProbeProviderUtil |
getProbeProviderUtil() |
Map<String,String> |
getResourceAdapterConfigProps(String rarName)
Retrieves the Resource adapter javabean properties with default values.
|
PrintWriter |
getResourceAdapterLogWriter()
Provides resource adapter log writer to be given to MCF of a resource-adapter
|
ResourceDeployer |
getResourceDeployer(Object resource) |
ResourceNamingService |
getResourceNamingService() |
Set |
getResourceReferenceDescriptor()
get resource reference descriptors from current component's jndi environment
|
Resources |
getResources() |
Resources |
getResources(PoolInfo poolInfo) |
Resources |
getResources(ResourceInfo resourceInfo) |
static ConnectorRuntime |
getRuntime()
Returns the ConnectorRuntime instance.
|
String |
getSecurityPermissionSpec(String moduleName)
Obtains the Permission string that needs to be added to the
to the security policy files.
|
SecurityRoleMapperFactory |
getSecurityRoleMapperFactory() |
ServerEnvironment |
getServerEnvironment() |
long |
getShutdownTimeout()
Gets the shutdown-timeout attribute configured in
connector-service |
String[] |
getSystemConnectorsAllowingPoolCreation()
Returns the system RAR names that allow pool creation
|
ClassLoader |
getSystemRARClassLoader(String rarName) |
Timer |
getTimer() |
Transaction |
getTransaction()
provides the current transaction
|
JavaEETransactionManager |
getTransactionManager()
provides the transactionManager
|
WorkContextHandler |
getWorkContextHandler() |
javax.resource.spi.work.WorkManager |
getWorkManagerProxy(String poolId,
String moduleName,
ClassLoader rarCL)
provides work manager proxy that is Serializable
|
List<WorkSecurityMap> |
getWorkSecurityMap(String raName)
get work security maps for a resource-adapter-name
|
javax.resource.spi.XATerminator |
getXATerminatorProxy(String moduleName)
provides XATerminator proxy that is Serializable
|
boolean |
hasAdminObject(String rarName,
String intfName,
String className)
checks whether the specified intfName, className has presence in
admin objects of the RAR
|
boolean |
isACCRuntime()
Checks whether the executing environment is appclient container runtime
|
boolean |
isConnectorConnectionPoolDeployed(PoolInfo poolInfo)
Checks if a conncetor connection pool has been deployed to this server
instance
|
boolean |
isConnectorPoolMonitoringEnabled() |
boolean |
isEmbedded()
Checks whether the executing environment is embedded
|
boolean |
isJdbcPoolMonitoringEnabled() |
boolean |
isNonACCRuntime()
Checks whether the executing environment is non-acc (standalone)
|
boolean |
isServer()
Checks whether the executing environment is application server
|
void |
loadDeferredResourceAdapter(String rarName) |
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.ConnectionManager |
obtainConnectionManager(PoolInfo poolInfo,
boolean forceNoLazyAssoc,
ResourceInfo resourceInfo)
provides connection manager for a pool
|
javax.resource.spi.ManagedConnectionFactory[] |
obtainManagedConnectionFactories(PoolInfo poolInfo)
Returns the MCF instances in scenarions where a pool has to
return multiple mcfs.
|
javax.resource.spi.ManagedConnectionFactory |
obtainManagedConnectionFactory(PoolInfo poolInfo)
Returns the MCF instance.
|
javax.resource.spi.ManagedConnectionFactory |
obtainManagedConnectionFactory(PoolInfo poolInfo,
Hashtable env)
Returns the MCF instance.
|
boolean |
pingConnectionPool(PoolInfo poolInfo)
Tests whether the configuration for the pool is valid by making a connection.
|
void |
postConstruct()
The component has been injected with any dependency and
will be placed into commission by the subsystem.
|
void |
preDestroy()
The component is about to be removed from commission
|
boolean |
reconfigureConnectorConnectionPool(ConnectorConnectionPool ccp,
Set excludedProps)
Reconfigure a connection pool.
|
void |
recreateConnectorConnectionPool(ConnectorConnectionPool ccp)
Recreate a connector connection pool.
|
void |
registerConnectorApplication(ConnectorApplication rarModule)
register the connector application with registry
|
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 |
registerMailSessions(Application application) |
void |
removeWorkManagerProxy(String moduleName) |
void |
shutdownAllActiveResourceAdapters()
Shut down all active resource adapters
|
void |
switchOnMatching(String rarName,
PoolInfo poolInfo)
Causes pool to switch on the matching of connections.
|
void |
switchOnMatchingInJndi(PoolInfo poolInfo)
Causes matching to be switched on the ConnectorConnectionPool
bound in JNDI
|
void |
undeployResourcesOfModule(String rarName)
undeploy resources of the module
|
void |
unregisterConnectorApplication(String rarName)
unregister the connector application from registry
|
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 |
unRegisterMailSessions(Application application) |
public ConnectorRuntime()
public static ConnectorRuntime getRuntime()
public ConnectionPoolProbeProviderUtil getProbeProviderUtil()
public ResourceNamingService getResourceNamingService()
public ProcessEnvironment.ProcessType getEnvironment()
getEnvironment in interface ConnectorRuntimepublic MonitoringBootstrap getMonitoringBootstrap()
public String getDefaultPoolName(String moduleName, String connectionDefName)
moduleName - rar module nameconnectionDefName - connection definition namepublic void deleteConnectorConnectionPool(PoolInfo poolInfo) throws ConnectorRuntimeException
poolInfo - Name of the pool to deleteConnectorRuntimeException - if pool deletion operation failspublic void createConnectorConnectionPool(ConnectorConnectionPool connectorPoolObj) throws ConnectorRuntimeException
connectorPoolObj - ConnectorConnectionPool instance to be bound to JNDI. This
object contains the pool properties.ConnectorRuntimeException - When creation of pool fails.public void createConnectorResource(ResourceInfo resourceInfo, PoolInfo poolInfo, String resourceType) throws ConnectorRuntimeException
resourceInfo - JNDI name of the resource to be createdpoolInfo - to which the connector resource belongs.resourceType - Unused.ConnectorRuntimeException - If the resouce creation fails.public String getDefaultResourceName(String moduleName, String connectionDefName)
moduleName - rar module nameconnectionDefName - connection definition namepublic PrintWriter getResourceAdapterLogWriter()
public void deleteConnectorResource(ResourceInfo resourceInfo) throws ConnectorRuntimeException
resourceInfo - JNDI name of the resource to delete.ConnectorRuntimeException - if connector resource deletion fails.public ConnectorDescriptor getConnectorDescriptor(String rarName) throws ConnectorRuntimeException
getConnectorDescriptor in interface ConnectorRuntimerarName - Name of the rarConnectorRuntimeException - when unable to get descriptorpublic void createActiveResourceAdapter(String moduleDir, String moduleName, ClassLoader loader) throws ConnectorRuntimeException
createActiveResourceAdapter in interface ConnectorRuntimemoduleDir - Directory where rar module is exploded.moduleName - Name of the moduleloader - Classloader used to load the .rarConnectorRuntimeException - if creation fails.public void createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, String moduleName, String moduleDir, ClassLoader loader) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic void createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, String moduleName, String moduleDir) throws ConnectorRuntimeException
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.ConnectorRuntimeException - if creation fails.public void destroyActiveResourceAdapter(String moduleName) throws ConnectorRuntimeException
destroyActiveResourceAdapter in interface ConnectorRuntimemoduleName - Name of the rarModule to destroy/deleteConnectorRuntimeException - if the deletion failspublic javax.resource.spi.ManagedConnectionFactory obtainManagedConnectionFactory(PoolInfo poolInfo) throws ConnectorRuntimeException
obtainManagedConnectionFactory in interface ConnectorRuntimepoolInfo - Name of the pool.MCF pertaining to this pool is
created/returned.ConnectorRuntimeException - if creation/retrieval of MCF failspublic javax.resource.spi.ManagedConnectionFactory obtainManagedConnectionFactory(PoolInfo poolInfo, Hashtable env) throws ConnectorRuntimeException
obtainManagedConnectionFactory in interface ConnectorRuntimepoolInfo - Name of the pool.MCF pertaining to this pool is
created/returned.env - Environment entries to use for lookupConnectorRuntimeException - if creation/retrieval of MCF failspublic javax.resource.spi.ManagedConnectionFactory[] obtainManagedConnectionFactories(PoolInfo poolInfo) throws ConnectorRuntimeException
poolInfo - Name of the pool.MCFs pertaining to this pool is
created/returned.ConnectorRuntimeException - if creation/retrieval of MCFs failspublic javax.resource.spi.ConnectionManager obtainConnectionManager(PoolInfo poolInfo, boolean forceNoLazyAssoc, ResourceInfo resourceInfo) throws ConnectorRuntimeException
poolInfo - pool nameforceNoLazyAssoc - when set to true, lazy association feature will be turned off (even if it is ON via
pool attribute)ConnectorRuntimeException - when unable to provide a connection managerpublic Object lookupPMResource(ResourceInfo resourceInfo, boolean force) throws NamingException
lookupPMResource in interface ConnectorRuntimeresourceInfo - 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.public Object lookupPMResource(String jndiName, boolean force) throws NamingException
lookupPMResource in interface ConnectorRuntimejndiName - 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.public Object lookupNonTxResource(String jndiName, boolean force) throws NamingException
lookupNonTxResource in interface ConnectorRuntimejndiName - 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.public Object lookupNonTxResource(ResourceInfo resourceInfo, boolean force) throws NamingException
lookupNonTxResource in interface ConnectorRuntimeresourceInfo - 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.public Connection getConnection(ResourceInfo resourceInfo, String user, String password) throws SQLException
resourceInfo - the jndi name of the resource being used to get Connection from
This resource can either be a pmf resource or a jdbc resourceuser - the user used to authenticate this requestpassword - the password used to authenticate this requestSQLException - in case of errorspublic Connection getConnection(ResourceInfo resourceInfo) throws SQLException
resourceInfo - the jndi name of the resource being used to get Connection from
This resource can either be a pmf resource or a jdbc resourceSQLException - in case of errorspublic Map<String,Object> getConnectionDefinitionPropertiesAndDefaults(String connectionDefinitionClassName, String resType)
getConnectionDefinitionPropertiesAndDefaults in interface ConnectorRuntimeconnectionDefinitionClassName - The Connection Definition Java bean class for which
overrideable properties are required.resType - resource-typepublic Map<String,String> getBuiltInCustomResources()
getBuiltInCustomResources in interface ConnectorRuntimepublic String[] getSystemConnectorsAllowingPoolCreation()
getSystemConnectorsAllowingPoolCreation in interface ConnectorRuntimepublic String[] getConnectionDefinitionNames(String rarName) throws ConnectorRuntimeException
getConnectionDefinitionNames in interface ConnectorRuntimerarName - rar moduleNameConnectorRuntimeException - when unable to obtain connection definition from descriptor.public String getSecurityPermissionSpec(String moduleName) throws ConnectorRuntimeException
getSecurityPermissionSpec in interface ConnectorRuntimemoduleName - rar module NameConnectorRuntimeException - If rar.xml parsing or annotation processing fails.public String[] getAdminObjectInterfaceNames(String rarName) throws ConnectorRuntimeException
getAdminObjectInterfaceNames in interface ConnectorRuntimerarName - rar moduleNameConnectorRuntimeException - when unable to obtain admin object interface namespublic String[] getAdminObjectClassNames(String rarName, String intfName) throws ConnectorRuntimeException
getAdminObjectClassNames in interface ConnectorRuntimerarName - rar moduleNameintfName - admin-object-interface-nameConnectorRuntimeException - when unable to obtain admin object interface namespublic boolean hasAdminObject(String rarName, String intfName, String className) throws ConnectorRuntimeException
hasAdminObject in interface ConnectorRuntimerarName - resource-adapter nameintfName - admin object interface nameclassName - admin object class nameConnectorRuntimeException - when unable to determine the presencepublic Map<String,String> getResourceAdapterConfigProps(String rarName) throws ConnectorRuntimeException
getResourceAdapterConfigProps in interface ConnectorRuntimerarName - rar module nameConnectorRuntimeException - if property retrieval fails.public Map<String,String> getMCFConfigProps(String rarName, String connectionDefName) throws ConnectorRuntimeException
getMCFConfigProps in interface ConnectorRuntimerarName - rar module nameconnectionDefName - connection-definition-nameConnectorRuntimeException - if property retrieval fails.public Map<String,String> getAdminObjectConfigProps(String rarName, String adminObjectIntf) throws ConnectorRuntimeException
getAdminObjectConfigProps in interface ConnectorRuntimerarName - rar module nameadminObjectIntf - admin-object-interface nameConnectorRuntimeException - if property retrieval fails.public Map<String,String> getAdminObjectConfigProps(String rarName, String adminObjectIntf, String adminObjectClass) throws ConnectorRuntimeException
getAdminObjectConfigProps in interface ConnectorRuntimerarName - rar module nameadminObjectIntf - admin-object-interface nameadminObjectClass - admin-object-class nameConnectorRuntimeException - if property retrieval fails.public Map<String,String> getConnectorConfigJavaBeans(String rarName, String connectionDefName, String type) throws ConnectorRuntimeException
getConnectorConfigJavaBeans in interface ConnectorRuntimerarName - rar module nameconnectionDefName - connection definition nametype - JavaBean type to introspectConnectorRuntimeException - if property retrieval fails.public String getActivationSpecClass(String rarName, String messageListenerType) throws ConnectorRuntimeException
getActivationSpecClass in interface ConnectorRuntimerarName - name of the rar modulemessageListenerType - MessageListener typeConnectorRuntimeException - If moduleDir is null.
If corresponding rar is not deployed.public String[] getMessageListenerTypes(String rarName) throws ConnectorRuntimeException
getMessageListenerTypes in interface ConnectorRuntimerarName - name of the rar module.ConnectorRuntimeException - If moduleDir is null.
If corresponding rar is not deployed.public Map<String,String> getMessageListenerConfigProps(String rarName, String messageListenerType) throws ConnectorRuntimeException
getMessageListenerConfigProps in interface ConnectorRuntimerarName - 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 anypublic Map<String,String> getMessageListenerConfigPropTypes(String rarName, String messageListenerType) throws ConnectorRuntimeException
getMessageListenerConfigPropTypes in interface ConnectorRuntimerarName - 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 anypublic void switchOnMatching(String rarName, PoolInfo poolInfo)
rarName - Name of Resource Adpater.poolInfo - Name of the pool.public void switchOnMatchingInJndi(PoolInfo poolInfo) throws ConnectorRuntimeException
poolInfo - Name of the poolConnectorRuntimeException - when unable to set matching via jndi objectpublic GlassfishNamingManager getNamingManager()
public void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructpublic boolean isConnectorConnectionPoolDeployed(PoolInfo poolInfo)
poolInfo - connection pool namepublic boolean reconfigureConnectorConnectionPool(ConnectorConnectionPool ccp, Set excludedProps) throws ConnectorRuntimeException
ccp - - the Updated connector connection pool object that admin
hands overexcludedProps - - A set of excluded property names that we want
to be excluded in the comparison check while
comparing MCF propertiesConnectorRuntimeException - when unable to reconfigure ccppublic void recreateConnectorConnectionPool(ConnectorConnectionPool ccp) throws ConnectorRuntimeException
ccp - - the ConnectorConnectionPool to publishConnectorRuntimeException - when unable to recreate ccppublic void createConnectorConnectionPool(ConnectorConnectionPool ccp, String connectionDefinitionName, String rarName, List<org.jvnet.hk2.config.types.Property> props, List<SecurityMap> securityMaps) throws ConnectorRuntimeException
ccp - ConnectorConnectionPool instance to be bound to JNDI. This
object contains the pool properties.connectionDefinitionName - Connection definition name against which
connection pool is being createdrarName - Name of the resource adapterprops - Properties of MCF which are present in domain.xml
These properties override the ones present in ra.xmlsecurityMaps - Array fo security maps.ConnectorRuntimeException - When creation of pool fails.public void cleanUpResourcesAndShutdownAllActiveRAs()
cleanUpResourcesAndShutdownAllActiveRAs in interface ConnectorRuntimepublic void shutdownAllActiveResourceAdapters()
shutdownAllActiveResourceAdapters in interface ConnectorRuntimepublic PoolManager getPoolManager()
public InvocationManager getInvocationManager()
getInvocationManager in interface ConnectorRuntimepublic Timer getTimer()
public Set getResourceReferenceDescriptor()
getResourceReferenceDescriptor in interface ConnectorRuntimepublic void preDestroy()
preDestroy in interface org.glassfish.hk2.api.PreDestroypublic AuthenticationService getAuthenticationService(String rarName, PoolInfo poolInfo)
rarName - Rar module NamepoolInfo - Name of the pool. Used for creation of
BasicPasswordAuthenticationServicepublic boolean isEmbedded()
isEmbedded in interface ConnectorRuntimepublic boolean isNonACCRuntime()
public boolean isServer()
isServer in interface ConnectorRuntimepublic boolean isACCRuntime()
public Transaction getTransaction() throws SystemException
SystemException - when unable to get the transactionpublic JavaEETransactionManager getTransactionManager()
getTransactionManager in interface ConnectorRuntimepublic void registerConnectorNamingEventListener(ConnectorNamingEventListener listener)
registerConnectorNamingEventListener in interface ConnectorRuntimelistener - connector-naming-event-listenerpublic void unregisterConnectorNamingEventListener(ConnectorNamingEventListener listener)
unregisterConnectorNamingEventListener in interface ConnectorRuntimelistener - connector-naming-event-listenerpublic ResourcePool getConnectionPoolConfig(PoolInfo poolInfo)
ConnectorRuntimegetConnectionPoolConfig in interface ConnectorRuntimepublic boolean pingConnectionPool(PoolInfo poolInfo) throws javax.resource.ResourceException
ConnectorRuntimepingConnectionPool in interface ConnectorRuntimejavax.resource.ResourceException - when unable to pingpublic ConnectorConstants.PoolType getPoolType(PoolInfo poolInfo) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic javax.resource.spi.work.WorkManager getWorkManagerProxy(String poolId, String moduleName, ClassLoader rarCL) throws ConnectorRuntimeException
poolId - ThreadPoolIdmoduleName - resource-adapter namerarCL - classloader of the resource-adapterConnectorRuntimeException - when unable to get work managerpublic javax.resource.spi.XATerminator getXATerminatorProxy(String moduleName)
moduleName - resource-adapter namepublic void removeWorkManagerProxy(String moduleName)
public void addAdminObject(String appName, String connectorName, ResourceInfo resourceInfo, String adminObjectType, String adminObjectClassName, Properties props) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic void deleteAdminObject(ResourceInfo resourceInfo) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic ClassLoader getSystemRARClassLoader(String rarName) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic ClassLoader createConnectorClassLoader(String moduleDirectory, ClassLoader parent, String rarModuleName) throws ConnectorRuntimeException
createConnectorClassLoader in interface ConnectorRuntimemoduleDirectory - rar module directory for which classloader is neededparent - parent classloaderConnectorRuntimeException - when unable to create classloaderpublic ResourceDeployer getResourceDeployer(Object resource)
public void addResourceAdapterConfig(String rarName, ResourceAdapterConfig raConfig) throws ConnectorRuntimeException
rarName - rarmoduleraConfig - Resource Adapter configuration objectConnectorRuntimeException - if the addition fails.public void deleteResourceAdapterConfig(String rarName) throws ConnectorRuntimeException
rarName - rarmoduleConnectorRuntimeExceptionpublic void registerConnectorApplication(ConnectorApplication rarModule)
rarModule - resource-adapter modulepublic void unregisterConnectorApplication(String rarName)
rarName - resource-adapter namepublic void undeployResourcesOfModule(String rarName)
rarName - resource-adapter namepublic void deployResourcesOfModule(String rarName)
rarName - resource-adapter namepublic ActiveRAFactory getActiveRAFactory()
public Applications getApplications()
public ApplicationRegistry getAppRegistry()
public ApplicationArchivist getApplicationArchivist()
public FileArchive getFileArchive()
public Domain getDomain()
public ServerEnvironment getServerEnvironment()
public void createActiveResourceAdapterForEmbeddedRar(String rarModuleName) throws ConnectorRuntimeException
ConnectorRuntimecreateActiveResourceAdapterForEmbeddedRar in interface ConnectorRuntimerarModuleName - Name of the moduleConnectorRuntimeException - if creation fails.public boolean checkAccessibility(String rarName, ClassLoader loader)
rarName - Resource adapter module name.loader - ClassLoader to verify.public void loadDeferredResourceAdapter(String rarName) throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic SecurityRoleMapperFactory getSecurityRoleMapperFactory()
public CallbackHandler getCallbackHandler()
getCallbackHandler in interface ConnectorRuntimepublic ConnectorArchivist getConnectorArchvist() throws ConnectorRuntimeException
ConnectorRuntimeExceptionpublic WorkContextHandler getWorkContextHandler()
public ComponentEnvManager getComponentEnvManager()
public DelegatingClassLoader getConnectorClassLoader()
getConnectorClassLoader in interface ConnectorRuntimepublic ClassLoaderHierarchy getClassLoaderHierarchy()
public void registerDataSourceDefinitions(Application application)
registerDataSourceDefinitions in interface ConnectorRuntimeapplication - Application being deployed.public void unRegisterDataSourceDefinitions(Application application)
unRegisterDataSourceDefinitions in interface ConnectorRuntimeapplication - Application being undeployed.public void registerMailSessions(Application application)
public void unRegisterMailSessions(Application application)
public List<WorkSecurityMap> getWorkSecurityMap(String raName)
getWorkSecurityMap in interface ConnectorRuntimeraName - resource-adapter namepublic Resources getResources(ResourceInfo resourceInfo)
public Resources getResources()
public long getShutdownTimeout()
ConnectorRuntimeconnector-servicegetShutdownTimeout in interface ConnectorRuntimepublic boolean flushConnectionPool(String poolName) throws ConnectorRuntimeException
flushConnectionPool in interface ConnectorRuntimepoolName - ConnectorRuntimeExceptionpublic boolean flushConnectionPool(PoolInfo poolInfo) throws ConnectorRuntimeException
flushConnectionPool in interface ConnectorRuntimepoolInfo - ConnectorRuntimeExceptionpublic Set<String> getJdbcDriverClassNames(String dbVendor, String resType)
getJdbcDriverClassNames in interface ConnectorRuntimedbVendor - resType - public Set<String> getJdbcDriverClassNames(String dbVendor, String resType, boolean introspect)
getJdbcDriverClassNames in interface ConnectorRuntimedbVendor - resType - introspect - public ConnectorJavaBeanValidator getConnectorBeanValidator()
public boolean getPingDuringPoolCreation(PoolInfo poolInfo)
getPingDuringPoolCreation in interface ConnectorRuntimepoolInfo - public Set<String> getDatabaseVendorNames()
getDatabaseVendorNames in interface ConnectorRuntimepublic boolean isJdbcPoolMonitoringEnabled()
public boolean isConnectorPoolMonitoringEnabled()
public void associateResourceAdapter(String rarName, javax.resource.spi.ResourceAdapterAssociation raa) throws javax.resource.ResourceException
ConnectorRuntimeassociateResourceAdapter in interface ConnectorRuntimerarName - resource-adapter-nameraa - Object that is an instance of ResourceAdapterAssociationjavax.resource.ResourceException - when unable to associate the RA Bean with RAA instance.public ResourceManager getGlobalResourceManager()
public List<String> getConfidentialProperties(String rarName, String type, String... keyFields) throws ConnectorRuntimeException
ConnectorRuntimegetConfidentialProperties in interface ConnectorRuntimerarName - 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 whenConnectorRuntimeExceptionCopyright © 2017. All rights reserved.