Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    *
    * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
    *
    * The contents of this file are subject to the terms of either the GNU
    * General Public License Version 2 only ("GPL") or the Common Development
    * and Distribution License("CDDL") (collectively, the "License").  You
    * may not use this file except in compliance with the License.  You can
   * obtain a copy of the License at
   * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
   * or packager/legal/LICENSE.txt.  See the License for the specific
   * language governing permissions and limitations under the License.
   *
   * When distributing the software, include this License Header Notice in each
   * file and include the License file at packager/legal/LICENSE.txt.
   *
   * GPL Classpath Exception:
   * Oracle designates this particular file as subject to the "Classpath"
   * exception as provided by Oracle in the GPL Version 2 section of the License
   * file that accompanied this code.
   *
   * Modifications:
   * If applicable, add the following below the License Header, with the fields
   * enclosed by brackets [] replaced by your own identifying information:
   * "Portions Copyright [year] [name of copyright owner]"
   *
   * Contributor(s):
   * If you wish your version of this file to be governed by only the CDDL or
   * only the GPL Version 2, indicate your decision by adding "[Contributor]
   * elects to include this software in this distribution under the [CDDL or GPL
   * Version 2] license."  If you don't indicate a single choice of license, a
   * recipient has the option to distribute your version of this file under
   * either the CDDL, the GPL Version 2 or to extend the choice of license to
   * its licensees as provided above.  However, if you add GPL Version 2 code
   * and therefore, elected the GPL Version 2 license, then the option applies
   * only if the new code is made subject to such option by the copyright
   * holder.
   */
  
  package com.sun.enterprise.connectors;
  
  
  import  javax.resource.ResourceException;
  import  javax.resource.spi.ConnectionManager;
  import  javax.resource.spi.ManagedConnectionFactory;
  import  javax.resource.spi.ResourceAdapterAssociation;
 import  javax.resource.spi.XATerminator;
 import  javax.resource.spi.work.WorkManager;
 import  javax.transaction.SystemException;
 import  javax.transaction.Transaction;
 import java.net.URI;
 import java.util.*;
This class is the entry point to connector backend module. It exposes different API's called by external entities like JPA, admin to perform various connector backend related operations. It delegates calls to various connetcor admin services and other connector services which actually implement the functionality. This is a delegating class.

Author(s):
Binod P.G, Srikanth P, Aditya Gore, Jagadish Ramu
 
         PostConstructPreDestroy {
 
     private static ConnectorRuntime _runtime;
     private Logger _logger = LogDomains.getLogger(ConnectorRuntime.class.);
     private ConnectorRegistry connectorRegistry = ConnectorRegistry.getInstance();
 
     @Inject
 
     @Inject
     private PoolManager poolManager;
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
     private ClassLoaderHierarchy clh;
 
     @Inject
 
     @Inject
     private ActiveRAFactory activeRAFactory;
 
     @Inject
 
     @Inject
 
     @Inject
 
     @Inject
     private Provider<DomaindomainProvider;
 
     @Inject
 
     @Inject
 
     @Inject
     private DriverLoader driverLoader;
 
     @Inject
 
     @Inject
 
     @Inject
     private ServerEnvironmentImpl env;
 
     @Inject
 
     @Inject
     private RarType archiveType;
 
     private Resources globalResources;
 
     // performance improvement, cache the lookup of transaction manager.
 
     @Inject
     private ServiceLocator habitat;

    
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

Returns:
ConnectorRuntime instance
 
     public static ConnectorRuntime getRuntime() {
         if ( == null) {
             throw new RuntimeException("Connector Runtime not initialized");
         }
         return ;
     }

    
Private constructor. It is private as it follows singleton pattern.
 
     public ConnectorRuntime() {
          = this;
     }
 
         return .get();
     }
 
         return ;
     }

    
Returns the execution environment.

Returns:
ConnectorConstants.SERVER if execution environment is appserv runtime else it returns ConnectorConstants.CLIENT
 
         return ;
     }
 
         return .get();
     }

    
Returns the generated default connection poolName for a connection definition.

Parameters:
moduleName rar module name
connectionDefName connection definition name
Returns:
generated connection poolname
 
     public String getDefaultPoolName(String moduleName,
                                      String connectionDefName) {
         return .getDefaultPoolName(moduleNameconnectionDefName);
     }

    
Deletes connector Connection pool

Parameters:
poolInfo Name of the pool to delete
Throws:
ConnectorRuntimeException if pool deletion operation fails
 
     public void deleteConnectorConnectionPool(PoolInfo poolInfo)
             throws ConnectorRuntimeException {
     }


    
Creates connector connection pool in the connector container.

Parameters:
connectorPoolObj ConnectorConnectionPool instance to be bound to JNDI. This object contains the pool properties.
Throws:
ConnectorRuntimeException When creation of pool fails.
 
     public void createConnectorConnectionPool(
             ConnectorConnectionPool connectorPoolObj)
             throws ConnectorRuntimeException {
         .createConnectorConnectionPool(connectorPoolObj);
     }

    
Creates the connector resource on a given connection pool

Parameters:
resourceInfo JNDI name of the resource to be created
poolInfo to which the connector resource belongs.
resourceType Unused.
Throws:
ConnectorRuntimeException If the resouce creation fails.
 
     public void createConnectorResource(ResourceInfo resourceInfoPoolInfo poolInfo,
                                         String resourceTypethrows ConnectorRuntimeException {
 
         .createConnectorResource(resourceInfopoolInforesourceType);
     }

    
Returns the generated default connector resource for a connection definition.

Parameters:
moduleName rar module name
connectionDefName connection definition name
Returns:
generated default connector resource name
 
     public String getDefaultResourceName(String moduleName,
                                          String connectionDefName) {
         return .getDefaultResourceName(
                 moduleNameconnectionDefName);
     }

    
Provides resource adapter log writer to be given to MCF of a resource-adapter

Returns:
PrintWriter
 
         Logger logger = LogDomains.getLogger(ConnectorRuntime.class.);
         RAWriterAdapter writerAdapter = new RAWriterAdapter(logger);
         return new PrintWriter(writerAdapter);
     }

    
Deletes the connector resource.

Parameters:
resourceInfo JNDI name of the resource to delete.
Throws:
ConnectorRuntimeException if connector resource deletion fails.
 
     public void deleteConnectorResource(ResourceInfo resourceInfothrows 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
 
             throws ConnectorRuntimeException {
         return .getConnectorDescriptor(rarName);
 
     }

    
 
     public void createActiveResourceAdapter(String moduleDir,
                                             String moduleName,
                                             ClassLoader loaderthrows ConnectorRuntimeException {
         .createActiveResourceAdapter(moduleDirmoduleNameloader);
     }
    
 
     public void  createActiveResourceAdapterConnectorDescriptor connectorDescriptorString moduleName,
             String moduleDirClassLoader loaderthrows ConnectorRuntimeException {
         .createActiveResourceAdapter(connectorDescriptormoduleNamemoduleDirloader);
     }

    
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 module
moduleDir Directory where rar module is exploded.
Throws:
ConnectorRuntimeException if creation fails.
 
 
     public void  createActiveResourceAdapterConnectorDescriptor connectorDescriptorString moduleName,
             String moduleDirthrows ConnectorRuntimeException {
         .createActiveResourceAdapter(connectorDescriptormoduleNamemoduleDirnull);
     }

    
 
     public void destroyActiveResourceAdapter(String moduleName)
             throws ConnectorRuntimeException {
     }


    
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.

Parameters:
poolInfo Name of the pool.MCF pertaining to this pool is created/returned.
Returns:
created/already present MCF instance
Throws:
ConnectorRuntimeException if creation/retrieval of MCF fails
 
     public ManagedConnectionFactory obtainManagedConnectionFactory(
            PoolInfo poolInfothrows ConnectorRuntimeException {
         return .obtainManagedConnectionFactory(poolInfo);
      }


    
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.

Parameters:
poolInfo Name of the pool.MCF pertaining to this pool is created/returned.
Returns:
created/already present MCF instance
Throws:
ConnectorRuntimeException if creation/retrieval of MCF fails
 
     public ManagedConnectionFactory obtainManagedConnectionFactory(
             PoolInfo poolInfoHashtable envthrows ConnectorRuntimeException {
         return .obtainManagedConnectionFactory(poolInfoenv);
     }

    
Returns the MCF instances in scenarions where a pool has to return multiple mcfs. Should be used only during JMS RA recovery.

Parameters:
poolInfo Name of the pool.MCFs pertaining to this pool is created/returned.
Returns:
created MCF instances
Throws:
ConnectorRuntimeException if creation/retrieval of MCFs fails
 
 
     public ManagedConnectionFactory[]  obtainManagedConnectionFactories(
            PoolInfo poolInfothrows ConnectorRuntimeException {
         return .obtainManagedConnectionFactories(poolInfo);
     }


    
provides connection manager for a pool

Parameters:
poolInfo pool name
forceNoLazyAssoc when set to true, lazy association feature will be turned off (even if it is ON via pool attribute)
Returns:
ConnectionManager for the pool
Throws:
ConnectorRuntimeException when unable to provide a connection manager
 
     public ConnectionManager obtainConnectionManager(PoolInfo poolInfo,
                                                      boolean forceNoLazyAssocResourceInfo resourceInfo)
             throws ConnectorRuntimeException {
         ConnectionManager mgr = ConnectionManagerFactory.
                 getAvailableConnectionManager(poolInfoforceNoLazyAssocresourceInfo);
         return mgr;
     }

    
 
     public Object lookupPMResource(ResourceInfo resourceInfoboolean forcethrows NamingException{
         Object result ;
         try{
             if(!resourceInfo.getName().endsWith()){
                 ResourceInfo tmpInfo = new ResourceInfo(resourceInfo.getName()+,
                         resourceInfo.getApplicationName(), resourceInfo.getModuleName());
                 resourceInfo = tmpInfo;
             }
 
             result = .lookup(resourceInfo);
         }catch(NamingException ne){
             if(force && isDAS()){
                 if(.isLoggable(.)) {
                     .log(."jdbc.unable_to_lookup_resource",new Object[] {resourceInfo});
                 }
                 result = lookupDataSourceInDAS(resourceInfo);
             }else{
                 throw ne;
             }
         }
         return result;
     }

    
 
     public Object lookupPMResource(String jndiNameboolean forcethrows NamingException {
         ResourceInfo resourceInfo = new ResourceInfo(jndiName);
         return lookupPMResource(resourceInfoforce);
     }

    
 
     public Object lookupNonTxResource(String jndiNameboolean forcethrows NamingException {
         ResourceInfo resourceInfo = new ResourceInfo(jndiName);
         return lookupNonTxResource(resourceInfoforce);
     }

    
 
     public Object lookupNonTxResource(ResourceInfo resourceInfoboolean forcethrows NamingException {
 
         Object result ;
         try{
             if(!resourceInfo.getName().endsWith()){
                 ResourceInfo tmpInfo = new ResourceInfo(resourceInfo.getName()+,
                         resourceInfo.getApplicationName(), resourceInfo.getModuleName());
                 resourceInfo = tmpInfo;
             }
             result = .lookup(resourceInfo);
         }catch(NamingException ne){
             if(force && isDAS()){
                 if(.isLoggable(.)) {
                     .log(."jdbc.unable_to_lookup_resource",new Object[] {resourceInfo});
                 }
                 result = lookupDataSourceInDAS(resourceInfo);
             }else{
                 throw ne;
             }
         }
         return result;
     }
 
     private boolean isDAS(){
         return .isDas();
     }

    
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.

Parameters:
resourceInfo jndi name of the resource
Returns:
DataSource representing the resource.
 
     private Object lookupDataSourceInDAS(ResourceInfo resourceInfo) {
         try{
             Collection<ConnectorRuntimeExtensionextensions =
                     .getAllServices(ConnectorRuntimeExtension.class);
             for(ConnectorRuntimeExtension extension : extensions) {
                 return extension.lookupDataSourceInDAS(resourceInfo);
             }
             //return connectorResourceAdmService.lookupDataSourceInDAS(resourceInfo);
         }catch(ConnectorRuntimeException cre){
             throw new RuntimeException(cre.getMessage(), cre);
         }
         return null;
     }

    
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.

Parameters:
resourceInfo the jndi name of the resource being used to get Connection from This resource can either be a pmf resource or a jdbc resource
user the user used to authenticate this request
password the password used to authenticate this request
Returns:
a java.sql.Connection
Throws:
java.sql.SQLException in case of errors
 
     public Connection getConnection(ResourceInfo resourceInfoString userString password)
             throws SQLException{
 	    return .getConnectionresourceInfouserpassword );
     }

    
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.

Parameters:
resourceInfo the jndi name of the resource being used to get Connection from This resource can either be a pmf resource or a jdbc resource
Returns:
a java.sql.Connection
Throws:
java.sql.SQLException in case of errors
 
     public Connection getConnection(ResourceInfo resourceInfo)
             throws SQLException{
 	    return .getConnectionresourceInfo );
     }


    
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.

Parameters:
connectionDefinitionClassName The Connection Definition Java bean class for which overrideable properties are required.
Returns:
Map<String, Object> String represents property name and Object is the defaultValue that is a primitive type or String.
 
     public Map<StringObjectgetConnectionDefinitionPropertiesAndDefaults(String connectionDefinitionClassNameString resType) {
                 connectionDefinitionClassNameresType);
     }

    
Provides the list of built in custom resources by resource-type and factory-class-name pair.

Returns:
map of resource-type & factory-class-name
 
         return ConnectorsUtil.getBuiltInCustomResources();
     }

    
Returns the system RAR names that allow pool creation

Returns:
String array representing list of system-rars
 
 
         Collection<StringvalidSystemRarsAllowingPoolCreation = new ArrayList<String>();
         Collection<StringvalidSystemRars = ConnectorsUtil.getSystemRARs();
         for(String systemRarName : ){
             if(validSystemRars.contains(systemRarName)){
                 validSystemRarsAllowingPoolCreation.add(systemRarName);
             }
         }
         String[] systemRarNames = new String[validSystemRarsAllowingPoolCreation.size()];
         return validSystemRarsAllowingPoolCreation.toArray(systemRarNames);
     }


    
 
     public String[] getConnectionDefinitionNames(String rarName)
                throws ConnectorRuntimeException {
         return .getConnectionDefinitionNames(rarName);
     }

    
 
     public String getSecurityPermissionSpec(String moduleName)
                          throws ConnectorRuntimeException {
         return .getSecurityPermissionSpec(moduleName);
     }

    
 
     public String[] getAdminObjectInterfaceNames(String rarName)
                throws ConnectorRuntimeException {
         return .getAdminObjectInterfaceNames(rarName);
     }

    
 
     public String[] getAdminObjectClassNames(String rarNameString intfName)
             throws ConnectorRuntimeException {
         return .getAdminObjectClassNames(rarNameintfName);
     }

    
 
     public boolean hasAdminObject(String rarNameString intfNameString className)
                 throws ConnectorRuntimeException{
         return .hasAdminObject(rarNameintfNameclassName);
     }

    
 
                 throws ConnectorRuntimeException {
         Properties properties = .getResourceAdapterConfigProps(rarName);
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
     public Map<String,StringgetMCFConfigProps(
      String rarName,String connectionDefNamethrows ConnectorRuntimeException {
         Properties properties = .getMCFConfigProps(
 		    rarName,connectionDefName);
 
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
       String rarName,String adminObjectIntfthrows ConnectorRuntimeException {
         Properties properties =
 	    .getAdminObjectConfigProps(rarName,adminObjectIntf);
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
       String rarName,String adminObjectIntfString adminObjectClassthrows ConnectorRuntimeException {
         Properties properties =
 	     .getAdminObjectConfigProps(rarName,adminObjectIntfadminObjectClass);
 
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
     public Map<String,StringgetConnectorConfigJavaBeans(String rarName,
         String connectionDefName,String typethrows ConnectorRuntimeException {
 
                              rarName,connectionDefName,type);
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
     public String getActivationSpecClassString rarName,
              String messageListenerTypethrows ConnectorRuntimeException {
                           rarName,messageListenerType);
     }

    
 
     public String[] getMessageListenerTypes(String rarName)
                throws ConnectorRuntimeException  {
         return .getMessageListenerTypesrarName);
     }

    
 
          String messageListenerType)throws ConnectorRuntimeException {
         Properties properties =
                         rarName,messageListenerType);
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
 
                String messageListenerTypethrows ConnectorRuntimeException {
                         rarName,messageListenerType);
         return ConnectorsUtil.convertPropertiesToMap(properties);
     }

    
Returns the configurable ResourceAdapterBean Properties for a connector module bundled as a RAR.

Parameters:
pathToDeployableUnit a physical,accessible location of the connector module. [either a RAR for RAR-based deployments or a directory for Directory based deployments]
Returns:
A Map that is of <String RAJavaBeanPropertyName, String defaultPropertyValue> An empty map is returned in the case of a 1.0 RAR
 
 /* TODO
     public Map getResourceAdapterBeanProperties(String pathToDeployableUnit) throws ConnectorRuntimeException{
         return configParserAdmService.getRABeanProperties(pathToDeployableUnit);
     }
 */

    
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.

Parameters:
rarName Name of Resource Adpater.
poolInfo Name of the pool.
 
     public void switchOnMatching(String rarNamePoolInfo poolInfo) {
         .switchOnMatching(rarNamepoolInfo);
     }

    
Causes matching to be switched on the ConnectorConnectionPool bound in JNDI

Parameters:
poolInfo Name of the pool
Throws:
ConnectorRuntimeException when unable to set matching via jndi object
 
     public void switchOnMatchingInJndi(PoolInfo poolInfo)
             throws ConnectorRuntimeException {
         .switchOnMatching(poolInfo);
     }
 
         return ;
     }

    
The component has been injected with any dependency and will be placed into commission by the subsystem.
 
     public void postConstruct() {
                 ConnectorAdminServicesFactory.getService(.);
                 ConnectorAdminServicesFactory.getService(.);
          = new ConnectorService();
                 ConnectorAdminServicesFactory.getService(.);
                 ConnectorAdminServicesFactory.getService(.);
                 ConnectorAdminServicesFactory.getService(.);
 
         if(isServer()) {
             getProbeProviderUtil().registerProbeProvider();
         }
         if(isServer() || isEmbedded()){
         }
 
     }

    
initializes the connector runtime mode to be SERVER or CLIENT

Parameters:
processEnvironment ProcessEnvironment
 
     private void initializeEnvironment(ProcessEnvironment processEnvironment) {
          = processEnvironment.getProcessType();
     }

    
Checks if a conncetor connection pool has been deployed to this server instance

Parameters:
poolInfo connection pool name
Returns:
boolean indicating whether the resource is deployed or not
 
     public boolean isConnectorConnectionPoolDeployed(PoolInfo poolInfo) {
         return .isConnectorConnectionPoolDeployed(poolInfo);
     }

    
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

Parameters:
ccp - the Updated connector connection pool object that admin hands over
excludedProps - A set of excluded property names that we want to be excluded in the comparison check while comparing MCF properties
Returns:
true - if a pool restart is required, false otherwise
Throws:
ConnectorRuntimeException when unable to reconfigure ccp
 
             ccpSet excludedPropsthrows ConnectorRuntimeException {
                 ccpexcludedProps);
     }

    
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

Parameters:
ccp - the ConnectorConnectionPool to publish
Throws:
ConnectorRuntimeException when unable to recreate ccp
 
             throws ConnectorRuntimeException {
     }

    
Creates connector connection pool in the connector container.

Parameters:
ccp ConnectorConnectionPool instance to be bound to JNDI. This object contains the pool properties.
connectionDefinitionName Connection definition name against which connection pool is being created
rarName Name of the resource adapter
props Properties of MCF which are present in domain.xml These properties override the ones present in ra.xml
securityMaps Array fo security maps.
Throws:
ConnectorRuntimeException When creation of pool fails.
 
                                               String connectionDefinitionNameString rarName,
                                               List<Propertyprops,
                                               List<SecurityMapsecurityMaps)
             throws ConnectorRuntimeException {
         .createConnectorConnectionPool(ccpconnectionDefinitionNamerarNamepropssecurityMaps);
     }


    
 
 
         Domain domain = .get();
         if (domain != null) {
             Collection<Resourceresources = ConnectorsUtil.getAllSystemRAResourcesAndPools(domain.getResources());
             .get().undeployResources(resources);
 
             resources = null;
             Collection<ConnectorRuntimeExtensionextensions =
                 .getAllServices(ConnectorRuntimeExtension.class);
             for(ConnectorRuntimeExtension extension : extensions) {
                     resources = extension.getAllSystemRAResourcesAndPools();
                 .get().undeployResources(resources);
             }
         }
     }
    
 
     public void shutdownAllActiveResourceAdapters() {
     }
 
     public PoolManager getPoolManager() {
         return ;
     }

    
provides the invocationManager

Returns:
InvocationManager
        return ;
    }
    public Timer getTimer() {
        return ConnectorTimerProxy.getProxy();
    }

    
get resource reference descriptors from current component's jndi environment

Returns:
set of resource-refs
        if (jndiEnv != null) {
            return jndiEnv.getResourceReferenceDescriptors();
        } else {
            return null;
        }
    }

    
The component is about to be removed from commission
    public void preDestroy() {
    }

    
Obtain the authentication service associated with rar module. Currently only the BasicPassword authentication is supported.

Parameters:
rarName Rar module Name
poolInfo Name of the pool. Used for creation of BasicPasswordAuthenticationService
Returns:
AuthenticationService connector runtime's authentication service
                                                          PoolInfo poolInfo) {
        return .getAuthenticationService(rarNamepoolInfo);
    }

    
Checks whether the executing environment is embedded

Returns:
true if execution environment is embedded
    public boolean isEmbedded() {
    }

    
Checks whether the executing environment is non-acc (standalone)

Returns:
true if execution environment is non-acc (standalone)
    public boolean isNonACCRuntime() {
    }

    
Checks whether the executing environment is application server

Returns:
true if execution environment is server false if it is client
    public boolean isServer() {
    }

    
Checks whether the executing environment is appclient container runtime

Returns:
true if execution environment is appclient container false if it is not ACC
    public boolean isACCRuntime() {
    }

    
provides the current transaction

Returns:
Transaction
Throws:
SystemException when unable to get the transaction
    public Transaction getTransaction() throws SystemException {
        return getTransactionManager().getTransaction();
    }

    
provides the transactionManager

Returns:
TransactionManager
        if ( == null) {
        }
        return ;
    }

    
Gets Connector Resource Rebind Event notifier.

Returns:
ConnectorNamingEventNotifier
/*    private ConnectorNamingEventNotifier getResourceRebindEventNotifier() {
        return connectorResourceAdmService.getResourceRebindEventNotifier();
    }
*/
    
register the connector naming event listener

Parameters:
listener connector-naming-event-listener
    }

    
unregister the connector naming event listner

Parameters:
listener connector-naming-event-listener
    }
    public ResourcePool getConnectionPoolConfig(PoolInfo poolInfo) {
            ResourcePool pool  = ResourcesUtil.createInstance().getPoolConfig(poolInfo);
            if(pool == null && (ConnectorsUtil.isApplicationScopedResource(poolInfo) ||
                    ConnectorsUtil.isModuleScopedResource(poolInfo))){
                //it is possible that the application scoped resources is being deployed
                Resources asc = ResourcesRegistry.getResources(poolInfo.getApplicationName(), poolInfo.getModuleName());
                pool = ConnectorsUtil.getConnectionPoolConfig(poolInfoasc);
            }
            if(pool == null){
                throw new RuntimeException("No pool by name [ "+poolInfo+" ] found");
            }
            return pool;
    }
    public boolean pingConnectionPool(PoolInfo poolInfothrows ResourceException {
        return .testConnectionPool(poolInfo);
    }
    public PoolType getPoolType(PoolInfo poolInfothrows ConnectorRuntimeException {
        return .getPoolType(poolInfo);
    }

    
provides work manager proxy that is Serializable

Parameters:
poolId ThreadPoolId
moduleName resource-adapter name
rarCL classloader of the resource-adapter
Returns:
WorkManager
Throws:
ConnectorRuntimeException when unable to get work manager
    public WorkManager getWorkManagerProxy(String poolIdString moduleNameClassLoader rarCL)
            throws ConnectorRuntimeException {
        return .get().getWorkManagerProxy(poolIdmoduleNamerarCL);
    }

    
provides XATerminator proxy that is Serializable

Parameters:
moduleName resource-adapter name
Returns:
XATerminator
    public XATerminator getXATerminatorProxy(String moduleName){
        XATerminator xat = getTransactionManager().getXATerminator();
        return new XATerminatorProxy(xat);
    }
    public void removeWorkManagerProxy(String moduleName) {
    }
    public void addAdminObject(String appNameString connectorNameResourceInfo resourceInfo,
                               String adminObjectTypeString adminObjectClassNameProperties props)
            throws ConnectorRuntimeException {
        .addAdminObject(appNameconnectorNameresourceInfoadminObjectType,
                adminObjectClassNameprops);
    }
    public void deleteAdminObject(ResourceInfo resourceInfothrows ConnectorRuntimeException {
        .deleteAdminObject(resourceInfo);
    }
        return .getSystemRARClassLoader(rarName);
    }

    
Given the module directory, creates a connector-class-finder (class-loader) for the module

Parameters:
moduleDirectory rar module directory for which classloader is needed
parent parent classloader
For standalone rars, pass null, as the parent should be common-class-loader that will be automatically taken care by ConnectorClassLoaderService.
For embedded rars, parent is necessary
Returns:
classloader created for the module
    public ClassLoader createConnectorClassLoader(String moduleDirectoryClassLoader parentString rarModuleName)
            throws ConnectorRuntimeException{
        List<URIlibraries = ConnectorsUtil.getInstalledLibrariesFromManifest(moduleDirectory);
        return .createRARClassLoader(moduleDirectoryparentrarModuleNamelibraries);
    }
    public ResourceDeployer getResourceDeployer(Object resource){
        return .get().getResourceDeployer(resource);
    }

    
Add the resource adapter configuration to the connector registry

Parameters:
rarName rarmodule
raConfig Resource Adapter configuration object
Throws:
ConnectorRuntimeException if the addition fails.
    public void addResourceAdapterConfig(String rarName,
           ResourceAdapterConfig raConfigthrows ConnectorRuntimeException {
        .addResourceAdapterConfig(rarName,raConfig);
    }

    
Delete the resource adapter configuration to the connector registry

Parameters:
rarName rarmodule
    public void deleteResourceAdapterConfig(String rarNamethrows ConnectorRuntimeException {
    }

    
register the connector application with registry

Parameters:
rarModule resource-adapter module
    public void registerConnectorApplication(ConnectorApplication rarModule){
    }

    
unregister the connector application from registry

Parameters:
rarName resource-adapter name
    public void unregisterConnectorApplication(String rarName){
    }

    
undeploy resources of the module

Parameters:
rarName resource-adapter name
    public void undeployResourcesOfModule(String rarName){
        app.undeployResources();
    }

    
deploy resources of the module

Parameters:
rarName resource-adapter name
    public void deployResourcesOfModule(String rarName){
        app.deployResources();
    }
        return ;
    }
    public Applications getApplications() {
        return .get();
    }
        return .get();
    }
        return .get();
    }
    public FileArchive getFileArchive(){
        return .get();
    }
    public Domain getDomain() {
        return .get();
    }
        return ;
    }
    public void createActiveResourceAdapterForEmbeddedRar(String rarModuleNamethrows ConnectorRuntimeException {
    }

    
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.
    public boolean checkAccessibility(String rarNameClassLoader loader) {
        return .checkAccessibility(rarNameloader);
    }
    public void loadDeferredResourceAdapter(String rarName)
                        throws ConnectorRuntimeException {
    }
        return .get();
    }

    
        //TODO V3 hack to make sure that SecurityServicesUtil is initialized before ContainerCallbackHander
        return .get();
    }
        ArchivistFactory archivistFactory = .get();
        return (ConnectorArchivistarchivistFactory.getArchivist();
    }
        return .get();
    }
        return ;
    }

    
        return .getConnectorClassLoader(null);
    }
        return ;
    }

    
        Collection<ConnectorRuntimeExtensionextensions =
                .getAllServices(ConnectorRuntimeExtension.class);
        for(ConnectorRuntimeExtension extension : extensions) {
            extension.registerDataSourceDefinitions(application);
        }
    }

    
        Collection<ConnectorRuntimeExtensionextensions =
                .getAllServices(ConnectorRuntimeExtension.class);
        for(ConnectorRuntimeExtension extension : extensions) {
</