public class DsXmlDeployer
extends org.jboss.jca.deployers.common.AbstractDsDeployer
implements com.github.fungal.spi.deployers.Deployer
Constructor and Description |
---|
DsXmlDeployer()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.net.URL url) |
protected java.lang.String[] |
bindConnectionFactory(java.lang.String deployment,
java.lang.String jndi,
java.lang.Object cf)
Bind connection factory into JNDI
|
protected void |
cleanTemporaryFiles(java.net.URL url)
Clean all potential temporary files
|
protected 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 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 javax.resource.spi.ResourceAdapter |
createRa(java.lang.String uniqueId,
java.lang.ClassLoader cl)
Create Ra
|
com.github.fungal.spi.deployers.Deployment |
deploy(java.net.URL url,
com.github.fungal.spi.deployers.Context context,
java.lang.ClassLoader parent) |
protected 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 java.io.File |
getFileFromUrl(java.net.URL url)
Get File object of URL who locate xml resource
|
protected java.lang.String |
getIronJacamarHome()
Get IronJacamar Home directory
|
java.lang.String |
getJDBCLocal()
Get the name for the JDBC Local resource adapter
|
java.lang.String |
getJDBCXA()
Get the name for the JDBC Xa resource adapter
|
protected org.jboss.jca.deployers.DeployersLogger |
getLogger()
Get the logger
|
org.jboss.jca.core.spi.mdr.MetadataRepository |
getMetadataRepository()
Get the metadata repository
|
int |
getOrder() |
org.jboss.jca.core.spi.rar.ResourceAdapterRepository |
getResourceAdapterRepository()
Get the resource adapter repository
|
protected org.jboss.jca.core.spi.security.SubjectFactory |
getSubjectFactory(org.jboss.jca.common.api.metadata.common.Credential credential,
java.lang.String jndiName)
Get a subject factory
|
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 java.lang.String |
registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
Register the ResourceAdapter to the ResourceAdapterRepository.
|
void |
setDriverRegistry(DriverRegistry value)
Set the driver registry
|
void |
setJDBCLocal(java.lang.String value)
Set the name for the JDBC Local resource adapter
|
void |
setJDBCXA(java.lang.String value)
Set the name for the JDBC XA resource adapter
|
void |
setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository value)
Set the metadata repository
|
void |
setResourceAdapterRepository(org.jboss.jca.core.spi.rar.ResourceAdapterRepository value)
Set the resource adapter repository
|
void |
start()
Start
|
associateResourceAdapter, buildJndiName, createObjectsAndInjectValue, createSubject, getCachedConnectionManager, getManagementRepository, getTransactionIntegration, getXAResourceRecoveryRegistry, initAndInjectClassLoaderPlugin, needsBootstrapContext, numberOfDataSources, setCachedConnectionManager, setManagementRepository, setTransactionIntegration, setXAResourceRecoveryRegistry, startContext, verifyTypes
public void setJDBCLocal(java.lang.String value)
value
- The valuepublic java.lang.String getJDBCLocal()
public void setJDBCXA(java.lang.String value)
value
- The valuepublic java.lang.String getJDBCXA()
protected org.jboss.jca.deployers.DeployersLogger getLogger()
getLogger
in class org.jboss.jca.deployers.common.AbstractDsDeployer
public void setDriverRegistry(DriverRegistry value)
value
- The valuepublic boolean accepts(java.net.URL url)
accepts
in interface com.github.fungal.spi.deployers.Deployer
public int getOrder()
getOrder
in interface com.github.fungal.spi.deployers.Deployer
public com.github.fungal.spi.deployers.Deployment deploy(java.net.URL url, com.github.fungal.spi.deployers.Context context, java.lang.ClassLoader parent) throws com.github.fungal.spi.deployers.DeployException
deploy
in interface com.github.fungal.spi.deployers.Deployer
com.github.fungal.spi.deployers.DeployException
protected java.io.File getFileFromUrl(java.net.URL url) throws java.net.URISyntaxException, java.io.IOException
url
- url of the archivejava.net.URISyntaxException
- Thrown if the resource adapter cant be foundjava.io.IOException
- Thrown if the resource adapter cant be accessibleprotected java.lang.String getIronJacamarHome()
protected void cleanTemporaryFiles(java.net.URL url) throws com.github.fungal.spi.deployers.DeployException
url
- url of the archivecom.github.fungal.spi.deployers.DeployException
- Thrown if the resource cant be cleanedpublic 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 org.jboss.jca.deployers.common.DeployException
initAndInject
in class org.jboss.jca.deployers.common.AbstractDsDeployer
className
- The fully qualified class nameconfigs
- The configuration propertiescl
- The class loaderorg.jboss.jca.deployers.common.DeployException
- Thrown if the object cant be initializedprotected java.lang.String[] bindConnectionFactory(java.lang.String deployment, java.lang.String jndi, java.lang.Object cf) throws java.lang.Throwable
bindConnectionFactory
in class org.jboss.jca.deployers.common.AbstractDsDeployer
deployment
- The deployment namejndi
- The JNDI namecf
- The connection factoryjava.lang.Throwable
- thrown if an error occursprotected java.lang.String getDriver(java.lang.String driverName, java.lang.String moduleId)
getDriver
in class org.jboss.jca.deployers.common.AbstractDsDeployer
driverName
- The name of the drivermoduleId
- The id of the modulenull
if not foundpublic void start()
protected java.lang.ClassLoader getDeploymentClassLoader(java.lang.String uniqueId)
org.jboss.jca.deployers.common.AbstractDsDeployer
getDeploymentClassLoader
in class org.jboss.jca.deployers.common.AbstractDsDeployer
uniqueId
- Theprotected org.jboss.jca.core.spi.security.SubjectFactory getSubjectFactory(org.jboss.jca.common.api.metadata.common.Credential credential, java.lang.String jndiName) throws org.jboss.jca.deployers.common.DeployException
org.jboss.jca.deployers.common.AbstractDsDeployer
getSubjectFactory
in class org.jboss.jca.deployers.common.AbstractDsDeployer
credential
- The security credentialjndiName
- optionally used for authentication context matchingnull
if credential security isn't enabled or if credential
is null
org.jboss.jca.deployers.common.DeployException
- Thrown if the security info can't be resolvedprotected javax.resource.spi.ResourceAdapter createRa(java.lang.String uniqueId, java.lang.ClassLoader cl) throws org.jboss.jca.core.spi.mdr.NotFoundException, java.lang.Exception, com.github.fungal.spi.deployers.DeployException
org.jboss.jca.deployers.common.AbstractDsDeployer
createRa
in class org.jboss.jca.deployers.common.AbstractDsDeployer
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 errororg.jboss.jca.deployers.common.DeployException
- in case of deploy errorcom.github.fungal.spi.deployers.DeployException
protected java.lang.String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
org.jboss.jca.deployers.common.AbstractDsDeployer
registerResourceAdapterToResourceAdapterRepository
in class org.jboss.jca.deployers.common.AbstractDsDeployer
instance
- the instanceprotected 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, com.github.fungal.spi.deployers.DeployException
org.jboss.jca.deployers.common.AbstractDsDeployer
createMcf
in class org.jboss.jca.deployers.common.AbstractDsDeployer
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 errroorg.jboss.jca.deployers.common.DeployException
- in case of deoloy errorcom.github.fungal.spi.deployers.DeployException
protected 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, com.github.fungal.spi.deployers.DeployException
org.jboss.jca.deployers.common.AbstractDsDeployer
createMcf
in class org.jboss.jca.deployers.common.AbstractDsDeployer
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 errroorg.jboss.jca.deployers.common.DeployException
- in case of deoloy errorcom.github.fungal.spi.deployers.DeployException
public void setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository value)
value
- The valuepublic org.jboss.jca.core.spi.mdr.MetadataRepository getMetadataRepository()
public void setResourceAdapterRepository(org.jboss.jca.core.spi.rar.ResourceAdapterRepository value)
value
- The valuepublic org.jboss.jca.core.spi.rar.ResourceAdapterRepository getResourceAdapterRepository()
Copyright © 2014 IronJacamar (http://www.ironjacamar.org)