Methods Summary |
---|
public void | addAdminObject(java.lang.String appName, java.lang.String connectorName, java.lang.String jndiName, java.lang.String adminObjectType, java.util.Properties props)
adminObjectAdmService.addAdminObject(
appName,connectorName,jndiName,adminObjectType,props);
|
public void | addResourceAdapterConfig(java.lang.String rarName, ResourceAdapterConfig raConfig)Add the resource adapter configuration to the connector registry
resourceAdapterAdmService.addResourceAdapterConfig(rarName,raConfig);
|
public boolean | checkAccessibility(java.lang.String rarName, java.lang.ClassLoader loader)
return connectorService.checkAccessibility(rarName, loader);
|
public boolean | checkAndLoadResource(java.lang.String resName)
return connectorService.checkAndLoadResource(resName);
|
public void | createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, java.lang.String moduleName, java.lang.String moduleDir)Creates Active resource Adapter which abstracts the rar module.
During the creation of ActiveResourceAdapter, default pools and
resources also are created.
resourceAdapterAdmService.createActiveResourceAdapter(
connectorDescriptor,moduleName,moduleDir);
|
public void | createActiveResourceAdapter(java.lang.String moduleDir, java.lang.String moduleName)Creates Active resource Adapter which abstracts the rar module.
During the creation of ActiveResourceAdapter, default pools and
resources also are created.
resourceAdapterAdmService.createActiveResourceAdapter(
moduleDir,moduleName);
|
public void | createConnectorConnectionPool(ConnectorConnectionPool ccp, java.lang.String connectionDefinitionName, java.lang.String rarName, com.sun.enterprise.config.serverbeans.ElementProperty[] props, com.sun.enterprise.config.serverbeans.SecurityMap[] securityMaps)Creates connector connection pool in the connector container.
ccPoolAdmService.createConnectorConnectionPool(
ccp,connectionDefinitionName,rarName,props,securityMaps);
|
public void | createConnectorConnectionPool(ConnectorConnectionPool ccp, ConnectionDefDescriptor cdd, java.lang.String rarName)Creates connector connection pool in the connector container.
ccPoolAdmService.createConnectorConnectionPool(ccp,cdd,rarName);
|
public void | createConnectorConnectionPool(ConnectorConnectionPool connectorPoolObj)Creates connector connection pool in the connector container.
ccPoolAdmService.createConnectorConnectionPool(
connectorPoolObj);
|
public void | createConnectorConnectionPool(ConnectorConnectionPool connectorPoolObj, java.lang.String security, java.util.Set configProperties)Creates connector connection pool in the connector container.
cannot be used for 1.5 rar cases
ccPoolAdmService.createConnectorConnectionPool(
connectorPoolObj,security,configProperties);
|
public void | createConnectorResource(java.lang.String jndiName, java.lang.String poolName, java.lang.String resourceType)Creates the connector resource on a given connection pool
connectorResourceAdmService.createConnectorResource(
jndiName,poolName,resourceType);
|
public void | deleteAdminObject(java.lang.String jndiName)
adminObjectAdmService.deleteAdminObject(jndiName);
|
public void | deleteConnectorConnectionPool(java.lang.String poolName)Deletes connector Connection pool
ccPoolAdmService.deleteConnectorConnectionPool(poolName);
|
public void | deleteConnectorConnectionPool(java.lang.String poolName, boolean cascade)Deletes connector Connection pool.
ccPoolAdmService.deleteConnectorConnectionPool(poolName,cascade);
|
public void | deleteConnectorResource(java.lang.String jndiName)Deletes the connector resource.
connectorResourceAdmService.deleteConnectorResource(jndiName);
|
public void | deleteResourceAdapterConfig(java.lang.String rarName)Delete the resource adapter configuration to the connector registry
resourceAdapterAdmService.deleteResourceAdapterConfig(rarName);
|
public void | destroyActiveResourceAdapter(java.lang.String moduleName)Destroys/deletes the Active resource adapter object from the
connector container. Active resource adapter abstracts the rar
deployed. It checks whether any resources (pools and connector
resources) are still present. If they are present the deletion
fails and all the objects and datastructures pertaining to
to the resource adapter are left untouched.
resourceAdapterAdmService.destroyActiveResourceAdapter(moduleName);
|
public void | destroyActiveResourceAdapter(java.lang.String moduleName, boolean cascade)Destroys/deletes the Active resource adapter object from the
connector container. Active resource adapter abstracts the rar
deployed. It checks whether any resources (pools and connector
resources) are still present. If they are present and cascade option
is false the deletion fails and all the objects and datastructures
pertaining to the resource adapter are left untouched.
If cascade option is true, even if resources are still present, they are
also destroyed with the active resource adapter
resourceAdapterAdmService.destroyActiveResourceAdapter(
moduleName,cascade);
|
public java.lang.String | getActivationSpecClass(java.lang.String rarName, java.lang.String messageListenerType)Return the ActivationSpecClass name for given rar and messageListenerType
return configParserAdmService.getActivationSpecClass(
rarName,messageListenerType);
|
public java.util.Properties | getAdminObjectConfigProps(java.lang.String rarName, java.lang.String adminObjectIntf)Retrieves the admin object javabean properties with default values.
The default values will the values present in the ra.xml. If the
value is not present in ra.xxml, javabean is introspected to obtain
the default value present, if any. If intrspection fails or null is the
default value, empty string is returned.
If ra.xml has only the property and no value, empty string is the value
returned.
return
rarName.indexOf( ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER ) == -1
? configParserAdmService.getAdminObjectConfigProps(
rarName,adminObjectIntf)
: new Properties();
|
public java.lang.String[] | getAdminObjectInterfaceNames(java.lang.String rarName)Obtains all the Admin object interface names of a rar
return configParserAdmService.getAdminObjectInterfaceNames(rarName);
|
public AuthenticationService | getAuthenticationService(java.lang.String rarName, java.lang.String poolName)Obtain the authentication service associated with rar module.
Currently only the BasicPassword authentication is supported.
return connectorSecurityAdmService.getAuthenticationService(
rarName,poolName);
|
public java.sql.Connection | getConnection(java.lang.String jndiName, java.lang.String user, java.lang.String password)Get a sql connection from the DataSource specified by the jdbcJndiName.
This API is intended to be used in the DAS. The motivation for having this
API is to provide the CMP backend a means of acquiring a connection during
the codegen phase. If a user is trying to deploy an app on a remote server,
without this API, a resource reference has to be present both in the DAS
and the server instance. This makes the deployment more complex for the
user since a resource needs to be forcibly created in the DAS Too.
This API will mitigate this need.
return ccPoolAdmService.getConnection( jndiName, user, password );
|
public java.sql.Connection | getConnection(java.lang.String jndiName)Get a sql connection from the DataSource specified by the jdbcJndiName.
This API is intended to be used in the DAS. The motivation for having this
API is to provide the CMP backend a means of acquiring a connection during
the codegen phase. If a user is trying to deploy an app on a remote server,
without this API, a resource reference has to be present both in the DAS
and the server instance. This makes the deployment more complex for the
user since a resource needs to be forcibly created in the DAS Too.
This API will mitigate this need.
return ccPoolAdmService.getConnection( jndiName );
|
public java.lang.String[] | getConnectionDefinitionNames(java.lang.String rarName)Obtains all the Connection definition names of a rar
return configParserAdmService.getConnectionDefinitionNames(rarName);
|
public static java.util.Set | getConnectionDefinitionProperties(java.lang.String connectionDefinitionClassName)Gets the properties of the Java bean connection definition class that
have setter methods defined
return getRuntime().ccPoolAdmService.getConnectionDefinitionProperties(
connectionDefinitionClassName);
|
public static java.util.Map | getConnectionDefinitionPropertiesAndDefaults(java.lang.String connectionDefinitionClassName)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.
This method is used to get properties of jdbc-data-source
To get Connection definition properties for Connector Connection Pool,
use ConnectorRuntime.getMCFConfigProperties()
When the connection definition class is not found, standard JDBC
properties (of JDBC 3.0 Specification) will be returned.
return getRuntime().ccPoolAdmService.getConnectionDefinitionPropertiesAndDefaults(
connectionDefinitionClassName);
|
public java.util.Properties | getConnectorConfigJavaBeans(java.lang.String rarName, java.lang.String connectionDefName, java.lang.String type)Retrieves the XXX javabean properties with default values.
The javabean to introspect/retrieve is specified by the type.
The default values will be the values present in the ra.xml. If the
value is not present in ra.xxml, javabean is introspected to obtain
the default value present, if any. If intrspection fails or null is the
default value, empty string is returned.
If ra.xml has only the property and no value, empty string is the value
returned.
return configParserAdmService.getConnectorConfigJavaBeans(
rarName,connectionDefName,type);
|
public ConnectorDescriptor | getConnectorDescriptor(java.lang.String rarName)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.
return connectorService.getConnectorDescriptor( rarName );
|
public java.lang.String | getDefaultPoolName(java.lang.String jndiName)Returns the generated default poolName of JMS resources.
return connectorService.getDefaultPoolName(jndiName);
|
public java.lang.String | getDefaultPoolName(java.lang.String moduleName, java.lang.String connectionDefName)Returns the generated default connection poolName for a
connection definition.
return connectorService.getDefaultPoolName(
moduleName,connectionDefName);
|
public java.lang.String | getDefaultResourceName(java.lang.String moduleName, java.lang.String connectionDefName)Returns the generated default connector resource for a
connection definition.
return connectorService.getDefaultResourceName(
moduleName,connectionDefName);
|
public int | getEnviron()Returns the execution environment.
return environment;
|
public JmsRaMapping | getJmsRaMapping()
return resourceAdapterAdmService.getJmsRaMapping();
|
public java.util.Properties | getMCFConfigProps(java.lang.String rarName, java.lang.String connectionDefName)Retrieves the MCF javabean properties with default values.
The default values will the values present in the ra.xml. If the
value is not present in ra.xxml, javabean is introspected to obtain
the default value present, if any. If intrspection fails or null is the
default value, empty string is returned.
If ra.xml has only the property and no value, empty string is the value
returned.
return
rarName.indexOf( ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER ) == -1
? configParserAdmService.getMCFConfigProps(
rarName,connectionDefName)
: new Properties();
|
public MQJMXConnectorInfo[] | getMQJMXConnectorInfo(java.lang.String target)Returns a list of MQJMXConnectorInfo associated with the target
/*
For getting a JMXConnector for each jms-host defined in jms-service:
If EMBEDDED/LOCAL and notclustered: get default JMS host from jms-service.
If MQRA has already been started, get from registry, introspect and get
the valid properties to construct MQJMXConnector
If clustered: get all hosts from JMS host information and for each of them
construct a MQRA instance, and get properties to construct MQJMXConnector
*/
return MQJMXConnectorHelper.getMQJMXConnectorInfo(target);
|
public java.util.Properties | getMessageListenerConfigPropTypes(java.lang.String rarName, java.lang.String messageListenerType)Returns the Properties object consisting of propertyname as the
key and datatype as the value.
return configParserAdmService.getMessageListenerConfigPropTypes(
rarName,messageListenerType);
|
public java.util.Properties | getMessageListenerConfigProps(java.lang.String rarName, java.lang.String messageListenerType)Parses the ra.xml for the ActivationSpec javabean
properties. The ActivationSpec to be parsed is
identified by the moduleDir where ra.xml is present and the
message listener type.
message listener type will be unique in a given ra.xml.
It throws ConnectorRuntimeException if either or both the
parameters are null, if corresponding rar is not deployed,
if message listener type mentioned as parameter is not found in ra.xml.
If rar is deployed and message listener (type mentioned) is present
but no properties are present for the corresponding message listener,
null is returned.
return
rarName.indexOf( ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER ) == -1
? configParserAdmService.getMessageListenerConfigProps(
rarName,messageListenerType)
: new Properties();
|
public java.lang.String[] | getMessageListenerTypes(java.lang.String rarName)
return configParserAdmService.getMessageListenerTypes( rarName);
|
public java.util.Map | getResourceAdapterBeanProperties(java.lang.String pathToDeployableUnit)Returns the configurable ResourceAdapterBean Properties
for a connector module bundled as a RAR.
return configParserAdmService.getRABeanProperties(pathToDeployableUnit);
|
public java.util.Properties | getResourceAdapterConfigProps(java.lang.String rarName)Retrieves the Resource adapter javabean properties with default values.
The default values will the values present in the ra.xml. If the
value is not present in ra.xxml, javabean is introspected to obtain
the default value present, if any. If intrspection fails or null is the
default value, empty string is returned.
If ra.xml has only the property and no value, empty string is the value
returned.
return
rarName.indexOf( ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER ) == -1
? configParserAdmService.getResourceAdapterConfigProps(rarName)
: new Properties();
|
public ConnectorNamingEventNotifier | getResourceRebindEventNotifier()Gets Connector Resource Rebind Event notifier.
return connectorResourceAdmService.getResourceRebindEventNotifier();
|
public static com.sun.enterprise.connectors.ConnectorRuntime | getRuntime()Returns the ConnectorRuntime instance.
It follows singleton pattern and only one instance exists at any point
of time. External entities need to call this method to get
ConnectorRuntime instance
return _runtime;
|
public java.lang.String | getSecurityPermissionSpec(java.lang.String moduleName)Obtains the Permission string that needs to be added to the
to the security policy files. These are the security permissions needed
by the resource adapter implementation classes.
These strings are obtained by parsing the ra.xml
return configParserAdmService.getSecurityPermissionSpec(moduleName);
|
public java.lang.String[] | getSystemConnectorsAllowingPoolCreation()Returns the system RAR names that allow pool creation
return new String[] {
ConnectorConstants.DEFAULT_JMS_ADAPTER,
ConnectorConstants.JAXR_RA_NAME};
|
public void | initialize(int environment)Initializes the execution environment. If the execution environment
is appserv runtime it is set to ConnectorConstants.SERVER else
it is set ConnectorConstants.CLIENT
this.environment = environment;
connectorService.initialize(getEnviron());
|
public void | initializeConnectorMonitoring()Initialize the monitoring listeners for connection pools, work management
and message end point factory related stats
connectorService.initializeConnectorMonitoring();
|
public boolean | isConnectorConnectionPoolDeployed(java.lang.String poolName)Checks if a conncetor connection pool has been deployed to this server
instance
return ccPoolAdmService.isConnectorConnectionPoolDeployed(poolName);
|
public static boolean | isJmsRa()
return ResourceAdapterAdminServiceImpl.isJmsRa();
|
public boolean | isRarDeployed(java.lang.String moduleName)Checks if the rar module is already reployed.
return resourceAdapterAdmService.isRarDeployed(moduleName);
|
public static boolean | isServer()Checks whether the executing environment is application server
return getRuntime().connectorService.isServer();
|
public boolean | isValidJndiSuffix(java.lang.String name)Code that checks whether a jndi suffix is valid or not.
return connectorResourceAdmService.isValidJndiSuffix(name);
|
public void | killAllPools(java.lang.String moduleName)Kills all the pools pertaining to the rar module.
ccPoolAdmService.killAllPools(moduleName);
|
public void | killPool(java.lang.String poolName)Kills a specific pool
ccPoolAdmService.killPool(poolName);
|
public synchronized void | loadAllSystemRAResources()Loads all system RA resources not used till now
This method is used when user accesses jndi tree.
if(!isSystemResourcesLoaded){
ResourcesUtil.createInstance().loadSystemRAResources();
isSystemResourcesLoaded = true;
}
|
public void | loadDeferredResourceAdapter(java.lang.String rarName)
connectorService.loadDeferredResourceAdapter(rarName);
|
public java.lang.Object | lookup(java.lang.String name)Lookup the JNDI name with appropriate suffix.
return connectorResourceAdmService.lookup(name);
|
private java.lang.Object | lookupDataSourceInDAS(java.lang.String jndiName)Get a wrapper datasource specified by the jdbcjndi name
This API is intended to be used in the DAS. The motivation for having this
API is to provide the CMP backend/ JPA-Java2DB a means of acquiring a connection during
the codegen phase. If a user is trying to deploy an JPA-Java2DB app on a remote server,
without this API, a resource reference has to be present both in the DAS
and the server instance. This makes the deployment more complex for the
user since a resource needs to be forcibly created in the DAS Too.
This API will mitigate this need.
return connectorResourceAdmService.lookupDataSourceInDAS(jndiName);
|
public java.lang.Object | lookupNonTxResource(java.lang.String jndiName, boolean force)Does lookup of non-tx-datasource. If found, it will be returned.
If not found and force is true, this api will try to get a wrapper datasource specified
by the jdbcjndi name. The motivation for having this
API is to provide the CMP backend/ JPA-Java2DB a means of acquiring a connection during
the codegen phase. If a user is trying to deploy an JPA-Java2DB app on a remote server,
without this API, a resource reference has to be present both in the DAS
and the server instance. This makes the deployment more complex for the
user since a resource needs to be forcibly created in the DAS Too.
This API will mitigate this need.
Object result ;
try{
result = connectorResourceAdmService.lookup(jndiName+NON_TX_JNDI_SUFFIX);
}catch(NamingException ne){
if(force && ResourcesUtil.isDAS()){
_logger.log(Level.FINE, "jdbc.unable_to_lookup_resource",new Object[] {jndiName});
result = lookupDataSourceInDAS(jndiName);
}else{
throw ne;
}
}
return result;
|
public java.lang.Object | lookupPMResource(java.lang.String jndiName, boolean force)Does lookup of "__pm" datasource. If found, it will be returned.
If not found and force is true, this api will try to get a wrapper datasource specified
by the jdbcjndi name. The motivation for having this
API is to provide the CMP backend/ JPA-Java2DB a means of acquiring a connection during
the codegen phase. If a user is trying to deploy an JPA-Java2DB app on a remote server,
without this API, a resource reference has to be present both in the DAS
and the server instance. This makes the deployment more complex for the
user since a resource needs to be forcibly created in the DAS Too.
This API will mitigate this need.
When the resource is not enabled, datasource wrapper provided will not be of
type "__pm"
Object result ;
try{
result = connectorResourceAdmService.lookup(jndiName+PM_JNDI_SUFFIX);
}catch(NamingException ne){
if(force && ResourcesUtil.isDAS()){
_logger.log(Level.FINE, "jdbc.unable_to_lookup_resource",new Object[] {jndiName});
result = lookupDataSourceInDAS(jndiName);
}else{
throw ne;
}
}
return result;
|
public ConnectionManager | obtainConnectionManager(java.lang.String poolName, boolean forceNoLazyAssoc)
ConnectionManager mgr = ConnectionManagerFactory.
getAvailableConnectionManager(poolName, forceNoLazyAssoc);
return mgr;
|
public ConnectionManager | obtainConnectionManager(java.lang.String poolName)
return this.obtainConnectionManager( poolName, false );
|
public ManagedConnectionFactory[] | obtainManagedConnectionFactories(java.lang.String poolName)Returns the MCF instances in scenarions where a pool has to
return multiple mcfs. Should be used only during JMS RA recovery.
return ccPoolAdmService.obtainManagedConnectionFactories(poolName);
|
public ManagedConnectionFactory | obtainManagedConnectionFactory(java.lang.String poolName)Returns the MCF instance. If the MCF is already created and
present in connectorRegistry that instance is returned. Otherwise it
is created explicitly and added to ConnectorRegistry.
return ccPoolAdmService.obtainManagedConnectionFactory(poolName);
|
public void | reCreateActiveResourceAdapter(java.lang.String moduleName)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.
resourceAdapterAdmService.reCreateActiveResourceAdapter(moduleName);
|
public boolean | reconfigureConnectorConnectionPool(ConnectorConnectionPool ccp)Reconfigure a connection pool.
This method compares the passed connector connection pool with the one
in memory. If the pools are unequal and the MCF properties are changed
a pool recreate is required. However if the pools are unequal and the
MCF properties are not changed a recreate is not required
return ccPoolAdmService.reconfigureConnectorConnectionPool(ccp);
|
public boolean | reconfigureConnectorConnectionPool(ConnectorConnectionPool ccp, java.util.Set excludedProps)Reconfigure a connection pool.
This method compares the passed connector connection pool with the one
in memory. If the pools are unequal and the MCF properties are changed
a pool recreate is required. However if the pools are unequal and the
MCF properties are not changed a recreate is not required
return ccPoolAdmService.reconfigureConnectorConnectionPool(
ccp,excludedProps);
|
public void | recreateConnectorConnectionPool(ConnectorConnectionPool ccp)Recreate a connector connection pool. This method essentially does
the following things:
1. Delete the said connector connection pool
2. Bind the pool to JNDI
3. Create an MCF for this pool and register with the connector registry
ccPoolAdmService.recreateConnectorConnectionPool(ccp);
|
public static void | stopAllActiveResourceAdapters()Calls the stop method for all J2EE Connector 1.5 spec compliant RARs
getRuntime().resourceAdapterAdmService.stopAllActiveResourceAdapters();
|
public boolean | stopAndRemoveActiveResourceAdapter(java.lang.String moduleName)Stops the resourceAdapter and removes it from connector container/
registry.
return resourceAdapterAdmService.stopAndRemoveActiveResourceAdapter(
moduleName);
|
public void | switchOnMatching(java.lang.String rarName, java.lang.String poolName)Causes pool to switch on the matching of connections.
It can be either directly on the pool or on the ConnectorConnectionPool
object that is bound in JNDI.
connectorService.switchOnMatching(rarName, poolName);
|
public void | switchOnMatchingInJndi(java.lang.String poolName)Causes matching to be switched on the ConnectorConnectionPool
bound in JNDI
ccPoolAdmService.switchOnMatching(poolName);
|
public boolean | testConnectionPool(java.lang.String poolName)This method is used to provide backend functionality for the
test-connection-pool asadmin command. Briefly the design is as
follows:
1. obtainManagedConnection for the poolname
2. lookup ConnectorDescriptorInfo from InitialContext using poolname
3. from cdi get username and password
4. create ResourcePrincipal using default username and password
5. create a Subject from this (doPriveleged)
6. createManagedConnection using above subject
7. getConnection from the ManagedConnection with above subject
return ccPoolAdmService.testConnectionPool(poolName);
|