Package com.sun.enterprise.connectors
Interface ActiveResourceAdapter
-
- All Known Subinterfaces:
ActiveInboundResourceAdapter
- All Known Implementing Classes:
ActiveInboundResourceAdapterImpl
,ActiveJmsResourceAdapter
,ActiveOutboundResourceAdapter
,ActiveResourceAdapterImpl
@Contract public interface ActiveResourceAdapter
Interface class for different types (1.0 and 1.5 complient) resource adapter abstraction classes. Contains methods for setup(initialization), destroy and creation of MCF.- Author:
- Srikanth P and Binod PG
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description jakarta.resource.spi.ManagedConnectionFactory[]
createManagedConnectionFactories(ConnectorConnectionPool ccp, ClassLoader loader)
Creates managed Connection factories corresponding to one pool.jakarta.resource.spi.ManagedConnectionFactory
createManagedConnectionFactory(ConnectorConnectionPool ccp, ClassLoader loader)
Creates managed Connection factory instance.void
destroy()
uninitializes the resource adapter.ClassLoader
getClassLoader()
Returns the class loader that is used to load the RAR.ConnectorDescriptor
getDescriptor()
Returns the Connector descriptor which represents/holds ra.xmlString
getModuleName()
Returns the module Name of the RARjakarta.resource.spi.ResourceAdapter
getResourceAdapter()
returns the resource-adapter beanboolean
handles(ConnectorDescriptor desc, String moduleName)
Indicates whether a particular implementation of ActiveRA can handle the RAR in question.void
init(jakarta.resource.spi.ResourceAdapter ra, ConnectorDescriptor cd, String moduleName, ClassLoader loader)
initializes the active (runtime) RARvoid
setup()
initializes the resource adapter bean and the resources, pools
-
-
-
Method Detail
-
init
void init(jakarta.resource.spi.ResourceAdapter ra, ConnectorDescriptor cd, String moduleName, ClassLoader loader) throws ConnectorRuntimeException
initializes the active (runtime) RAR- Parameters:
ra
- resource-adapter beancd
- connector-descriptormoduleName
- rar-nameloader
- classloader for the RAR- Throws:
ConnectorRuntimeException
- when unable to initialize the runtime RA
-
setup
void setup() throws ConnectorRuntimeException
initializes the resource adapter bean and the resources, pools- Throws:
ConnectorRuntimeException
- This exception is thrown if the setup/initialization fails.
-
destroy
void destroy()
uninitializes the resource adapter.
-
getDescriptor
ConnectorDescriptor getDescriptor()
Returns the Connector descriptor which represents/holds ra.xml- Returns:
- ConnectorDescriptor Representation of ra.xml.
-
handles
boolean handles(ConnectorDescriptor desc, String moduleName)
Indicates whether a particular implementation of ActiveRA can handle the RAR in question.- Parameters:
desc
- ConnectorDescriptormoduleName
- resource adapter name- Returns:
- boolean indiating whether a ActiveRA can handle the RAR
-
createManagedConnectionFactories
jakarta.resource.spi.ManagedConnectionFactory[] createManagedConnectionFactories(ConnectorConnectionPool ccp, ClassLoader loader)
Creates managed Connection factories corresponding to one pool. This should be implemented in the ActiveJmsResourceAdapter, for jms resources, has been implemented to perform xa resource recovery in mq clusters, not supported for any other code path.- Parameters:
ccp
- Connector connection pool which contains the pool properties and ra.xml values pertaining to managed connection factory class. These values are used in MCF creation.loader
- Classloader used to managed connection factory class.- Returns:
- ManagedConnectionFactory created managed connection factories
-
createManagedConnectionFactory
jakarta.resource.spi.ManagedConnectionFactory createManagedConnectionFactory(ConnectorConnectionPool ccp, ClassLoader loader)
Creates managed Connection factory instance.- Parameters:
ccp
- Connector connection pool which contains the pool properties and ra.xml values pertaining to managed connection factory class. These values are used in MCF creation.loader
- Classloader used to managed connection factory class.- Returns:
- ManagedConnectionFactory created managed connection factory instance
-
getClassLoader
ClassLoader getClassLoader()
Returns the class loader that is used to load the RAR.- Returns:
ClassLoader
object.
-
getModuleName
String getModuleName()
Returns the module Name of the RAR- Returns:
- A
String
representing the name of the connector module
-
getResourceAdapter
jakarta.resource.spi.ResourceAdapter getResourceAdapter()
returns the resource-adapter bean- Returns:
- resource-adapter bean
-
-