public abstract class AbstractDsDeployer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DeployersLogger |
log
log
|
protected org.jboss.jca.core.spi.transaction.TransactionIntegration |
transactionIntegration
The transaction integration
|
protected org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry |
xaResourceRecoveryRegistry
xaResourceRecoveryRegistry
|
Constructor and Description |
---|
AbstractDsDeployer()
Create a new AbstractDsDeployer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter,
java.lang.Object object)
Associate resource adapter with ojects if they implement ResourceAdapterAssociation
|
protected abstract java.lang.String[] |
bindConnectionFactory(java.lang.String deployment,
java.lang.String jndi,
java.lang.Object cf)
Bind connection factory into JNDI
|
protected java.lang.String |
buildJndiName(java.lang.String jndiName,
java.lang.Boolean javaContext)
Build the jndi name
|
protected abstract javax.resource.spi.ManagedConnectionFactory |
createMcf(org.jboss.jca.common.api.metadata.ds.DataSource ds,
java.lang.String uniqueId,
java.lang.ClassLoader cl)
Create Mcf for ds
|
protected abstract javax.resource.spi.ManagedConnectionFactory |
createMcf(org.jboss.jca.common.api.metadata.ds.XaDataSource ds,
java.lang.String uniqueId,
java.lang.ClassLoader cl)
Create Mcf for xads
|
protected CommonDeployment |
createObjectsAndInjectValue(java.net.URL url,
java.lang.String deploymentName,
java.lang.String uniqueJdbcLocalId,
java.lang.String uniqueJdbcXAId,
org.jboss.jca.common.api.metadata.ds.DataSources dataSources,
java.lang.ClassLoader parentClassLoader)
create objects and inject value for this depployment.
|
protected abstract javax.resource.spi.ResourceAdapter |
createRa(java.lang.String uniqueId,
java.lang.ClassLoader cl)
Create Ra
|
protected javax.security.auth.Subject |
createSubject(org.jboss.jca.core.spi.security.SubjectFactory subjectFactory,
java.lang.String securityDomain,
javax.resource.spi.ManagedConnectionFactory mcf,
java.lang.String jndiName)
Create a subject
|
org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager |
getCachedConnectionManager()
Get the ccm
|
protected abstract java.lang.ClassLoader |
getDeploymentClassLoader(java.lang.String uniqueId)
Provide the classloader of the deployment identified by the unique id
|
protected java.lang.String |
getDriver(java.lang.String driverName,
java.lang.String moduleId)
Get the driver
|
protected abstract DeployersLogger |
getLogger()
Get the logger
|
org.jboss.jca.core.api.management.ManagementRepository |
getManagementRepository()
Get the managementRepository.
|
protected abstract org.jboss.jca.core.spi.security.SubjectFactory |
getSubjectFactory(java.lang.String securityDomain)
Get a subject factory
|
org.jboss.jca.core.spi.transaction.TransactionIntegration |
getTransactionIntegration()
Get the transaction integration
|
org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry |
getXAResourceRecoveryRegistry()
Get the xAResourceRecoveryRegistry.
|
protected abstract java.lang.Object |
initAndInject(java.lang.String className,
java.util.List<? extends org.jboss.jca.common.api.metadata.spec.ConfigProperty> configs,
java.lang.ClassLoader cl)
Initialize and inject configuration properties
|
protected void |
initAndInjectClassLoaderPlugin(javax.resource.spi.ManagedConnectionFactory mcf,
org.jboss.jca.common.api.metadata.ds.CommonDataSource dsMetadata)
Initialize and inject class loader plugin
|
protected boolean |
needsBootstrapContext(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
Needs a BootstrapContext instance
|
protected int |
numberOfDataSources(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
Get the number of datasource deployments
|
protected abstract java.lang.String |
registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
Register the ResourceAdapter to the ResourceAdapterRepository.
|
void |
setCachedConnectionManager(org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager value)
Set the ccm
|
void |
setManagementRepository(org.jboss.jca.core.api.management.ManagementRepository managementRepository)
Set the managementRepository.
|
void |
setTransactionIntegration(org.jboss.jca.core.spi.transaction.TransactionIntegration value)
Set the transaction integration
|
void |
setXAResourceRecoveryRegistry(org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry xAResourceRecoveryRegistry)
Set the xAResourceRecoveryRegistry.
|
protected void |
startContext(javax.resource.spi.ResourceAdapter resourceAdapter,
java.lang.String bootstrapContextIdentifier)
Start the resource adapter
|
protected boolean |
verifyTypes(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
Verify the types of the datasources
|
protected DeployersLogger log
protected org.jboss.jca.core.spi.transaction.TransactionIntegration transactionIntegration
protected org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry xaResourceRecoveryRegistry
public void setTransactionIntegration(org.jboss.jca.core.spi.transaction.TransactionIntegration value)
value
- The valuepublic org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()
public org.jboss.jca.core.api.management.ManagementRepository getManagementRepository()
public void setManagementRepository(org.jboss.jca.core.api.management.ManagementRepository managementRepository)
managementRepository
- The managementRepository to set.public void setCachedConnectionManager(org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager value)
value
- The valuepublic org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager getCachedConnectionManager()
public org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry getXAResourceRecoveryRegistry()
public void setXAResourceRecoveryRegistry(org.jboss.jca.core.spi.transaction.recovery.XAResourceRecoveryRegistry xAResourceRecoveryRegistry)
xAResourceRecoveryRegistry
- The xAResourceRecoveryRegistry to set.protected CommonDeployment createObjectsAndInjectValue(java.net.URL url, java.lang.String deploymentName, java.lang.String uniqueJdbcLocalId, java.lang.String uniqueJdbcXAId, org.jboss.jca.common.api.metadata.ds.DataSources dataSources, java.lang.ClassLoader parentClassLoader) throws DeployException
CommonDeployment
to be used to exchange objects needed to real injection in the containerurl
- urldeploymentName
- deploymentNameuniqueJdbcLocalId
- uniqueJdbcLocalIduniqueJdbcXAId
- uniqueJdbcXAIdparentClassLoader
- cldataSources
- datasources metadata defined in xmlDeployException
- DeployExceptionprotected java.lang.String buildJndiName(java.lang.String jndiName, java.lang.Boolean javaContext)
jndiName
- The jndi namejavaContext
- The java contextprotected java.lang.String getDriver(java.lang.String driverName, java.lang.String moduleId)
driverName
- The name of the drivermoduleId
- The id of the modulenull
if not foundprotected int numberOfDataSources(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
datasources
- The datasourcesprotected boolean verifyTypes(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
datasources
- The datasourcesprotected boolean needsBootstrapContext(org.jboss.jca.common.api.metadata.ds.DataSources datasources)
datasources
- The datasourcesprotected void startContext(javax.resource.spi.ResourceAdapter resourceAdapter, java.lang.String bootstrapContextIdentifier) throws DeployException
resourceAdapter
- The resource adapterbootstrapContextIdentifier
- The bootstrap context identifierDeployException
- DeployException Thrown if the resource adapter cant be startedprotected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter, java.lang.Object object) throws DeployException
resourceAdapter
- resourceAdapter resourceAdapter The resource adapterobject
- object object The of possible association objectDeployException
- DeployException Thrown if the resource adapter cant be startedprotected abstract javax.resource.spi.ResourceAdapter createRa(java.lang.String uniqueId, java.lang.ClassLoader cl) throws org.jboss.jca.core.spi.mdr.NotFoundException, java.lang.Exception, DeployException
uniqueId
- the uniqueIdcl
- the classloaderorg.jboss.jca.core.spi.mdr.NotFoundException
- in case it's not found in cljava.lang.Exception
- in case of other errorDeployException
- in case of deploy errorprotected abstract java.lang.String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
instance
- the instanceprotected abstract javax.resource.spi.ManagedConnectionFactory createMcf(org.jboss.jca.common.api.metadata.ds.XaDataSource ds, java.lang.String uniqueId, java.lang.ClassLoader cl) throws org.jboss.jca.core.spi.mdr.NotFoundException, java.lang.Exception, DeployException
ds
- the xsdsuniqueId
- the uniqueIdcl
- the classloaderorg.jboss.jca.core.spi.mdr.NotFoundException
- in case it's not found in cljava.lang.Exception
- in case of other errroDeployException
- in case of deoloy errorprotected abstract javax.resource.spi.ManagedConnectionFactory createMcf(org.jboss.jca.common.api.metadata.ds.DataSource ds, java.lang.String uniqueId, java.lang.ClassLoader cl) throws org.jboss.jca.core.spi.mdr.NotFoundException, java.lang.Exception, DeployException
ds
- the xsdsuniqueId
- the uniqueIdcl
- the classloaderorg.jboss.jca.core.spi.mdr.NotFoundException
- in case it's not found in cljava.lang.Exception
- in case of other errroDeployException
- in case of deoloy errorprotected abstract java.lang.ClassLoader getDeploymentClassLoader(java.lang.String uniqueId)
uniqueId
- Theprotected abstract java.lang.String[] bindConnectionFactory(java.lang.String deployment, java.lang.String jndi, java.lang.Object cf) throws java.lang.Throwable
deployment
- The deployment namecf
- The connection factoryjndi
- passed jndi namejava.lang.Throwable
- Thrown if an error occursprotected abstract java.lang.Object initAndInject(java.lang.String className, java.util.List<? extends org.jboss.jca.common.api.metadata.spec.ConfigProperty> configs, java.lang.ClassLoader cl) throws DeployException
className
- The fully qualified class nameconfigs
- The configuration propertiescl
- The class loaderDeployException
- Thrown if the object cant be initializedprotected void initAndInjectClassLoaderPlugin(javax.resource.spi.ManagedConnectionFactory mcf, org.jboss.jca.common.api.metadata.ds.CommonDataSource dsMetadata) throws DeployException
mcf
- The managed connection factorydsMetadata
- The dataSource metadataDeployException
- Thrown if the object cant be initialized or injectedprotected abstract org.jboss.jca.core.spi.security.SubjectFactory getSubjectFactory(java.lang.String securityDomain) throws DeployException
securityDomain
- The security domainnull
if security domain isn't definedDeployException
- Thrown if the security domain can't be resolvedprotected abstract DeployersLogger getLogger()
protected javax.security.auth.Subject createSubject(org.jboss.jca.core.spi.security.SubjectFactory subjectFactory, java.lang.String securityDomain, javax.resource.spi.ManagedConnectionFactory mcf, java.lang.String jndiName)
subjectFactory
- The subject factorysecurityDomain
- The security domainmcf
- The managed connection factoryjndiName
- The jndi-name of the data-sourcenull
in case of an errorCopyright © 2014 IronJacamar (http://www.ironjacamar.org)