站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 connector API Documentation 英文版文档

RARDeployment (JBoss Connector API) - JBoss 4.0.1 sp1 connector API Documentation 英文版文档


org.jboss.resource.connectionmanager
Class RARDeployment

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.resource.connectionmanager.RARDeployment
All Implemented Interfaces:
javax.resource.spi.ManagedConnectionFactory, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, RARDeploymentMBean, Serializable, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class RARDeployment
extends org.jboss.system.ServiceMBeanSupport
implements RARDeploymentMBean, javax.resource.spi.ManagedConnectionFactory

The RARDeployment mbean manages instantiation and configuration of a ManagedConnectionFactory instance. It is intended to be configured primarily by xslt transformation of the ra.xml from a jca adapter. Until that is implemented, it uses the old RARDeployment and RARDeployer mechanism to obtain information from the ra.xml. Properties for the ManagedConectionFactory should be supplied with their values in the ManagedConnectionFactoryProperties element.

Version:
$Revision: 1.25.6.3 $
Author:
Toby Allsopp, David Jencks
See Also:
Serialized Form

Field Summary
static String MCF_ATTRIBUTE_CHANGED_NOTIFICATION
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.resource.connectionmanager.RARDeploymentMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
RARDeployment()
          Default managed constructor for RARDeployment mbeans.
 
Method Summary
 Object createConnectionFactory()
          Creates a connection factory instance.
 Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
          Creates a connection factory instance.
 javax.resource.spi.ManagedConnection createManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
          Creates a new ManagedConnection
 boolean equals(Object other)
          Tests object for equality
 String getAuthenticationMechanismType()
          The AuthenticationMechanismType attribute holds the AuthenticationMechanismType from the ra.xml.
 String getConnectionDefinition()
          The connection definition inside the rar, it identifies the unique connection factory
 String getConnectionFactoryImplClass()
          The ConnectionFactoryImplClass attribute holds the ConnectionFactoryImplClass from the ra.xml.
 String getConnectionFactoryInterface()
          The ConnectionFactoryInterface attribute holds the ConnectionFactoryInterface from the ra.xml.
 String getConnectionImplClass()
          The ConnectionImplClass attribute holds the ConnectionImplClass from the ra.xml.
 String getConnectionInterface()
          The ConnectionInterface attribute holds the ConnectionInterface from the ra.xml.
 String getCredentialInterface()
          The CredentialInterface attribute holds the CredentialInterface from the ra.xml.
 String getEisType()
          The EisType attribute holds the EisType from the ra.xml.
 PrintWriter getLogWriter()
          Gets the logwriter for this instance.
 Object getManagedConnectionFactoryAttribute(String name)
          The getManagedConnectionFactoryAttribute method can be used to examine the managed connection factory properties.
 String getManagedConnectionFactoryClass()
          The ManagedConnectionFactoryClass attribute holds the ManagedConnectionFactoryClass from the ra.xml.
 Element getManagedConnectionFactoryProperties()
          The ManagedConnectionFactoryProperties attribute holds the ManagedConnectionFactoryProperties from the ra.xml, together with user supplied values for all or some of these properties.
 javax.resource.spi.ManagedConnectionFactory getMcfInstance()
          The getMcfInstance method returns the ManagedConnectionFactory instance represented by this mbean.
 javax.management.ObjectName getOldRarDeployment()
          The OldRarDeployment attribute refers to a previous-generation RARDeployment.
 String getRARName()
          The RARName attribute holds the file name of the rar
 String getSpecVersion()
          The SpecVersion attribute holds the SpecVersion from the ra.xml It should be supplied by xslt from ra.xml
 String getTransactionSupport()
          The TransactionSupport attribute holds the TransactionSupport from the ra.xml.
 String getVendorName()
          The VendorName attribute holds the VendorName from the ra.xml It should be supplied by xslt from ra.xml
 String getVersion()
          The Version attribute holds the Version from the ra.xml.
 int hashCode()
          Generates a hashCode for this object
 boolean isReauthenticationSupport()
          The ReauthenticationSupport attribute holds the ReauthenticationSupport from the ra.xml.
 javax.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
          Returns a matching connection from the set.
 void setAuthenticationMechanismType(String authenticationMechanismType)
          Set the AuthenticationMechanismType value.
 void setConnectionDefinition(String connectionDefinition)
          Set the connection definition.
 void setConnectionFactoryImplClass(String connectionFactoryImplClass)
          Set the ConnectionFactoryImplClass value.
 void setConnectionFactoryInterface(String connectionFactoryInterface)
          Set the ConnectionFactoryInterface value.
 void setConnectionImplClass(String connectionImplClass)
          Set the ConnectionImplClass value.
 void setConnectionInterface(String connectionInterface)
          Set the ConnectionInterface value.
 void setCredentialInterface(String credentialInterface)
          Set the CredentialInterface value.
 void setEisType(String eisType)
          Set the EisType value.
 void setLogWriter(PrintWriter out)
          Sets the logwriter for this instance.
 void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value)
          The setManagedConnectionFactoryAttribute method can be used to set attributes on the ManagedConnectionFactory from code, without using the xml configuration.
protected  void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value, boolean mustExist)
           
 void setManagedConnectionFactoryClass(String managedConnectionFactoryClass)
          Set the ManagedConnectionFactoryClass value.
 void setManagedConnectionFactoryProperties(Element managedConnectionFactoryProperties)
          Set the ManagedConnectionFactoryProperties value.
protected  void setMcfProperties(Collection properties, boolean mustExist)
           
protected  void setMcfProperties(Element mcfProps)
           
 void setOldRarDeployment(javax.management.ObjectName oldRarDeployment)
          Set the value of OldRarDeployment
 void setRARName(String rarName)
          Set the RARName value.
 void setReauthenticationSupport(boolean reauthenticationSupport)
          Set the ReauthenticationSupport value.
 void setSpecVersion(String specVersion)
          Set the SpecVersion value.
 void setTransactionSupport(String transactionSupport)
          Set the TransactionSupport value.
 void setVendorName(String vendorName)
          Set the VendorName value.
 void setVersion(String version)
          Set the Version value.
protected  void startService()
          Describe startManagedConnectionFactory method here.
protected  void stopService()
          The stopManagedConnectionFactory method unbinds the ConnectionFactory from jndi, releases the ManagedConnectionFactory instane, and releases the ManagedConnectionFactory class.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

MCF_ATTRIBUTE_CHANGED_NOTIFICATION

public static final String MCF_ATTRIBUTE_CHANGED_NOTIFICATION
See Also:
Constant Field Values
Constructor Detail

RARDeployment

public RARDeployment()
Default managed constructor for RARDeployment mbeans.

Method Detail

getOldRarDeployment

public javax.management.ObjectName getOldRarDeployment()
The OldRarDeployment attribute refers to a previous-generation RARDeployment. THIS IS A HACK UNTIL XSLT DEPLOYMENT IS WRITTEN

Specified by:
getOldRarDeployment in interface RARDeploymentMBean
Returns:
value of OldRarDeployment

setOldRarDeployment

public void setOldRarDeployment(javax.management.ObjectName oldRarDeployment)
Set the value of OldRarDeployment

Specified by:
setOldRarDeployment in interface RARDeploymentMBean
Parameters:
oldRarDeployment - - Value to assign to OldRarDeployment

getRARName

public String getRARName()
The RARName attribute holds the file name of the rar

Specified by:
getRARName in interface RARDeploymentMBean
Returns:
the rar name value.

setRARName

public void setRARName(String rarName)
Set the RARName value.

Specified by:
setRARName in interface RARDeploymentMBean
Parameters:
rarName - The new DisplayName value.

getConnectionDefinition

public String getConnectionDefinition()
The connection definition inside the rar, it identifies the unique connection factory

Specified by:
getConnectionDefinition in interface RARDeploymentMBean
Returns:
the rar name value.

setConnectionDefinition

public void setConnectionDefinition(String connectionDefinition)
Set the connection definition.

Specified by:
setConnectionDefinition in interface RARDeploymentMBean
Parameters:
connectionDefinition - - the connection definition

getVendorName

public String getVendorName()
The VendorName attribute holds the VendorName from the ra.xml It should be supplied by xslt from ra.xml

Specified by:
getVendorName in interface RARDeploymentMBean
Returns:
the VendorName value.

setVendorName

public void setVendorName(String vendorName)
Set the VendorName value.

Specified by:
setVendorName in interface RARDeploymentMBean
Parameters:
vendorName - The new VendorName value.

getSpecVersion

public String getSpecVersion()
The SpecVersion attribute holds the SpecVersion from the ra.xml It should be supplied by xslt from ra.xml

Specified by:
getSpecVersion in interface RARDeploymentMBean
Returns:
the SpecVersion value.

setSpecVersion

public void setSpecVersion(String specVersion)
Set the SpecVersion value.

Specified by:
setSpecVersion in interface RARDeploymentMBean
Parameters:
specVersion - The new SpecVersion value.

getEisType

public String getEisType()
The EisType attribute holds the EisType from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getEisType in interface RARDeploymentMBean
Returns:
the EisType value.

setEisType

public void setEisType(String eisType)
Set the EisType value.

Specified by:
setEisType in interface RARDeploymentMBean
Parameters:
eisType - The new EisType value.

getVersion

public String getVersion()
The Version attribute holds the Version from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getVersion in interface RARDeploymentMBean
Returns:
the Version value.

setVersion

public void setVersion(String version)
Set the Version value.

Specified by:
setVersion in interface RARDeploymentMBean
Parameters:
version - The new Version value.

getManagedConnectionFactoryClass

public String getManagedConnectionFactoryClass()
The ManagedConnectionFactoryClass attribute holds the ManagedConnectionFactoryClass from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getManagedConnectionFactoryClass in interface RARDeploymentMBean
Returns:
the ManagedConnectionFactoryClass value.

setManagedConnectionFactoryClass

public void setManagedConnectionFactoryClass(String managedConnectionFactoryClass)
Set the ManagedConnectionFactoryClass value.

Specified by:
setManagedConnectionFactoryClass in interface RARDeploymentMBean
Parameters:
managedConnectionFactoryClass - The new ManagedConnectionFactoryClass value.

getConnectionFactoryInterface

public String getConnectionFactoryInterface()
The ConnectionFactoryInterface attribute holds the ConnectionFactoryInterface from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getConnectionFactoryInterface in interface RARDeploymentMBean
Returns:
the ConnectionFactoryInterface value.

setConnectionFactoryInterface

public void setConnectionFactoryInterface(String connectionFactoryInterface)
Set the ConnectionFactoryInterface value.

Specified by:
setConnectionFactoryInterface in interface RARDeploymentMBean
Parameters:
connectionFactoryInterface - The ConnectionFactoryInterface value.

getConnectionFactoryImplClass

public String getConnectionFactoryImplClass()
The ConnectionFactoryImplClass attribute holds the ConnectionFactoryImplClass from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getConnectionFactoryImplClass in interface RARDeploymentMBean
Returns:
the ConnectionFactoryImplClass value.

setConnectionFactoryImplClass

public void setConnectionFactoryImplClass(String connectionFactoryImplClass)
Set the ConnectionFactoryImplClass value.

Specified by:
setConnectionFactoryImplClass in interface RARDeploymentMBean
Parameters:
connectionFactoryImplClass - The ConnectionFactoryImplClass value.

getConnectionInterface

public String getConnectionInterface()
The ConnectionInterface attribute holds the ConnectionInterface from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getConnectionInterface in interface RARDeploymentMBean
Returns:
the ConnectionInterface value.

setConnectionInterface

public void setConnectionInterface(String connectionInterface)
Set the ConnectionInterface value.

Specified by:
setConnectionInterface in interface RARDeploymentMBean
Parameters:
connectionInterface - The ConnectionInterface value.

getConnectionImplClass

public String getConnectionImplClass()
The ConnectionImplClass attribute holds the ConnectionImplClass from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getConnectionImplClass in interface RARDeploymentMBean
Returns:
the connectionImplClass value.

setConnectionImplClass

public void setConnectionImplClass(String connectionImplClass)
Set the ConnectionImplClass value.

Specified by:
setConnectionImplClass in interface RARDeploymentMBean
Parameters:
connectionImplClass - The ConnectionImplClass value.

getTransactionSupport

public String getTransactionSupport()
The TransactionSupport attribute holds the TransactionSupport from the ra.xml. It should be supplied by xslt from ra.xml It is ignored, and choice of ConnectionManager implementations determine transaction support. Get the TransactionSupport value.

Specified by:
getTransactionSupport in interface RARDeploymentMBean
Returns:
the TransactionSupport value.

setTransactionSupport

public void setTransactionSupport(String transactionSupport)
Set the TransactionSupport value.

Specified by:
setTransactionSupport in interface RARDeploymentMBean
Parameters:
transactionSupport - The TransactionSupport value.

getManagedConnectionFactoryProperties

public Element getManagedConnectionFactoryProperties()
The ManagedConnectionFactoryProperties attribute holds the ManagedConnectionFactoryProperties from the ra.xml, together with user supplied values for all or some of these properties. This must be supplied as an element in the same format as in ra.xml, wrapped in a properties tag. It should be supplied by xslt from ra.xml merged with an user configuration xml file. An alternative format has a config-property element with attributes for name and type and the value as content.

Specified by:
getManagedConnectionFactoryProperties in interface RARDeploymentMBean
Returns:
the ManagedConnectionFactoryProperties value.

setManagedConnectionFactoryProperties

public void setManagedConnectionFactoryProperties(Element managedConnectionFactoryProperties)
Set the ManagedConnectionFactoryProperties value.

Specified by:
setManagedConnectionFactoryProperties in interface RARDeploymentMBean
Parameters:
managedConnectionFactoryProperties - The ManagedConnectionFactoryProperties value.

getAuthenticationMechanismType

public String getAuthenticationMechanismType()
The AuthenticationMechanismType attribute holds the AuthenticationMechanismType from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getAuthenticationMechanismType in interface RARDeploymentMBean
Returns:
the AuthenticationMechanismType value.

setAuthenticationMechanismType

public void setAuthenticationMechanismType(String authenticationMechanismType)
Set the AuthenticationMechanismType value.

Specified by:
setAuthenticationMechanismType in interface RARDeploymentMBean
Parameters:
authenticationMechanismType - The AuthenticationMechanismType value.

getCredentialInterface

public String getCredentialInterface()
The CredentialInterface attribute holds the CredentialInterface from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
getCredentialInterface in interface RARDeploymentMBean
Returns:
the CredentialInterface value.

setCredentialInterface

public void setCredentialInterface(String credentialInterface)
Set the CredentialInterface value.

Specified by:
setCredentialInterface in interface RARDeploymentMBean
Parameters:
credentialInterface - The CredentialInterface value.

isReauthenticationSupport

public boolean isReauthenticationSupport()
The ReauthenticationSupport attribute holds the ReauthenticationSupport from the ra.xml. It should be supplied by xslt from ra.xml

Specified by:
isReauthenticationSupport in interface RARDeploymentMBean
Returns:
the ReauthenticationSupport value.

setReauthenticationSupport

public void setReauthenticationSupport(boolean reauthenticationSupport)
Set the ReauthenticationSupport value.

Specified by:
setReauthenticationSupport in interface RARDeploymentMBean
Parameters:
reauthenticationSupport - The ReauthenticationSupport value.

getMcfInstance

public javax.resource.spi.ManagedConnectionFactory getMcfInstance()
The getMcfInstance method returns the ManagedConnectionFactory instance represented by this mbean. It is needed so PasswordCredentials can match up correctly. This will probably have to be implemented as an interceptor when the mcf is directly deployed as an mbean.

Specified by:
getMcfInstance in interface RARDeploymentMBean
Returns:
a ManagedConnectionFactory value

startService

protected void startService()
                     throws Exception
Describe startManagedConnectionFactory method here. creates managedConnectionFactory, creates ConnectionFactory, and binds it in jndi. Returns the ManagedConnectionFactory to the ConnectionManager that called us.

Throws:
Exception

stopService

protected void stopService()
The stopManagedConnectionFactory method unbinds the ConnectionFactory from jndi, releases the ManagedConnectionFactory instane, and releases the ManagedConnectionFactory class.


setManagedConnectionFactoryAttribute

public void setManagedConnectionFactoryAttribute(String name,
                                                 Class clazz,
                                                 Object value)
The setManagedConnectionFactoryAttribute method can be used to set attributes on the ManagedConnectionFactory from code, without using the xml configuration.

Specified by:
setManagedConnectionFactoryAttribute in interface RARDeploymentMBean
Parameters:
name - a String value
clazz - a Class value
value - an Object value

setManagedConnectionFactoryAttribute

protected void setManagedConnectionFactoryAttribute(String name,
                                                    Class clazz,
                                                    Object value,
                                                    boolean mustExist)

getManagedConnectionFactoryAttribute

public Object getManagedConnectionFactoryAttribute(String name)
The getManagedConnectionFactoryAttribute method can be used to examine the managed connection factory properties.

Specified by:
getManagedConnectionFactoryAttribute in interface RARDeploymentMBean
Parameters:
name - a String value
Returns:
an Object value

setMcfProperties

protected void setMcfProperties(Collection properties,
                                boolean mustExist)
                         throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

setMcfProperties

protected void setMcfProperties(Element mcfProps)
                         throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

createConnectionFactory

public Object createConnectionFactory()
                               throws javax.resource.ResourceException
Creates a connection factory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

createConnectionFactory

public Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
                               throws javax.resource.ResourceException
Creates a connection factory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                             throws javax.resource.ResourceException
Creates a new ManagedConnection

Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

equals

public boolean equals(Object other)
Tests object for equality

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory

getLogWriter

public PrintWriter getLogWriter()
                         throws javax.resource.ResourceException
Gets the logwriter for this instance.

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

hashCode

public int hashCode()
Generates a hashCode for this object

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet,
                                                                    Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                             throws javax.resource.ResourceException
Returns a matching connection from the set.

Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws javax.resource.ResourceException
Sets the logwriter for this instance.

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.