jrun.connector
Class J2EEConnector
jrunx.kernel.ServiceAdapter
|
+--jrunx.kernel.ServicePartition
|
+--jrunx.kernel.ConfigurableServicePartition
|
+--jrun.j2ee.J2EEModule
|
+--jrun.connector.J2EEConnector
- All Implemented Interfaces:
- ConfigurableServicePartitionMBean, J2EEConnectorMBean, J2EEModuleMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean
- public final class J2EEConnector
- extends J2EEModule
- implements J2EEConnectorMBean
This object is created for each instance of the ManagedConnectionFactory object. The J2EEConnectorFactory
object reads in the tag and creates an instance of this object for that
corresponding instance of the ManagedConnectionFactory object.
This is identified by the unique jndi name for this instance
Acts as the ConnectionManagerFactory for this instance of the connector's ManagedConnectionFactory object
Creates a ConnectionManager object to interact with the RA.
The J2EEConnectorFactory object passes in the metadata for this instance in the constructor of this object
- Author:
- Ramesh Natarajan
- See Also:
- , Serialized Form
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
|
Constructor Summary |
J2EEConnector(java.net.URL url,
java.lang.String displayName,
java.lang.String description,
ResourceadapterMetaData resourceAdapterMetaData,
java.lang.String jndiName,
java.net.URL[] nestedURLs)
|
|
Method Summary |
java.lang.Object |
createConnectionFactory(java.lang.String jndiName)
Instantiates the ManagedConnectionFactory, ConnectionFactory, ConnectionManagerImpl etc
Called by the ConnectorObjectFactory on JNDI lookup of the ConnectionFactory
Create a ConnectionManager instance for an instance of the ManagedConnectionFactory
for a resource adapter specified by configuration information in jrun-ra.xml. |
void |
destroy()
Cleanup the directory that we created to expand the rar file
recurse through any directories within this and clean them up |
java.lang.String |
getDescription()
|
java.lang.String |
getName()
Request the name by which the server refers to this service. |
static java.lang.Object |
getObjectFromString(java.lang.String string,
java.lang.Class type)
|
void |
init()
Gets TransactionManager and SecurityManager,
binds this J2EEConnector to JNDI under jrun:service/J2EEConnectorFactory/ |
void |
start()
Bind a Reference object in Jndi with the ObjectFactory info. |
void |
stop()
Invokes stop on all deployed EJB containers. |
| Methods inherited from class jrun.j2ee.J2EEModule |
getClassLoader, getDeploymentOrigin, getEJBPeers, getJ2EEMetaData, isRunning, postStart, resolveEJBLinks, setClassLoader, setDeploymentOrigin, setEJBPeers, setJ2EEMetaData, setName, setRunning |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
connManager
protected ConnectionManagerImpl connManager
tm
protected transient javax.transaction.TransactionManager tm
jsm
protected JRunSecurityManager jsm
description
protected java.lang.String description
displayName
protected java.lang.String displayName
jndiName
protected java.lang.String jndiName
deployedURL
protected java.net.URL deployedURL
nestedURLs
protected java.net.URL[] nestedURLs
J2EEConnector
public J2EEConnector(java.net.URL url,
java.lang.String displayName,
java.lang.String description,
ResourceadapterMetaData resourceAdapterMetaData,
java.lang.String jndiName,
java.net.URL[] nestedURLs)
throws DeploymentException
getName
public java.lang.String getName()
- Description copied from interface:
ServiceMBean
- Request the name by which the server refers to this service.
- Specified by:
getName in interface ServiceMBean- Overrides:
getName in class ServiceAdapter
init
public void init()
throws java.lang.Exception
- Gets TransactionManager and SecurityManager,
binds this J2EEConnector to JNDI under jrun:service/J2EEConnectorFactory/
- Specified by:
init in interface Service- Overrides:
init in class ConfigurableServicePartition
start
public void start()
throws java.lang.Exception
- Bind a Reference object in Jndi with the ObjectFactory info.
The actual creation happens in createConnectionFactory called by the ConnectorObjectFactory
Bind the ConnectionFactory to the corresponding jndiName in the metaData.
- Specified by:
start in interface Service- Overrides:
start in class ConfigurableServicePartition
stop
public void stop()
throws java.lang.Exception
- Invokes
stop on all deployed EJB containers.
- Specified by:
stop in interface Service- Overrides:
stop in class ConfigurableServicePartition
destroy
public void destroy()
throws java.lang.Exception
- Cleanup the directory that we created to expand the rar file
recurse through any directories within this and clean them up
- Specified by:
destroy in interface Service- Overrides:
destroy in class ConfigurableServicePartition
createConnectionFactory
public java.lang.Object createConnectionFactory(java.lang.String jndiName)
throws java.lang.Exception
- Instantiates the ManagedConnectionFactory, ConnectionFactory, ConnectionManagerImpl etc
Called by the ConnectorObjectFactory on JNDI lookup of the ConnectionFactory
Create a ConnectionManager instance for an instance of the ManagedConnectionFactory
for a resource adapter specified by configuration information in jrun-ra.xml.
Instantiate a ConnectionManagerFactory, ConnectionManager and ManagedConnectionFactory
Associate these three as per JCA spec.
If the ManagedConnectionFactory has already been created, that object is returned.
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription in interface J2EEConnectorMBean
getObjectFromString
public static java.lang.Object getObjectFromString(java.lang.String string,
java.lang.Class type)
Copyright � 2002 Macromedia Corporation. All Rights Reserved.