Package org.jboss.jca.deployers.fungal
Class DsXmlDeployer
- java.lang.Object
-
- org.jboss.jca.deployers.common.AbstractDsDeployer
-
- org.jboss.jca.deployers.fungal.DsXmlDeployer
-
- All Implemented Interfaces:
com.github.fungal.spi.deployers.Deployer
public class DsXmlDeployer extends AbstractDsDeployer implements com.github.fungal.spi.deployers.Deployer
The -ds.xml deployer for JCA/SJC- Author:
- Jesper Pedersen
-
-
Field Summary
-
Fields inherited from class org.jboss.jca.deployers.common.AbstractDsDeployer
transactionIntegration, xaResourceRecoveryRegistry
-
-
Constructor Summary
Constructors Constructor Description DsXmlDeployer()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(URL url)protected String[]bindConnectionFactory(String deployment, String jndi, Object cf)Bind connection factory into JNDIprotected voidcleanTemporaryFiles(URL url)Clean all potential temporary filesprotected jakarta.resource.spi.ManagedConnectionFactorycreateMcf(DataSource ds, String uniqueId, ClassLoader cl)protected jakarta.resource.spi.ManagedConnectionFactorycreateMcf(XaDataSource ds, String uniqueId, ClassLoader cl)protected jakarta.resource.spi.ResourceAdaptercreateRa(String uniqueId, ClassLoader cl)com.github.fungal.spi.deployers.Deploymentdeploy(URL url, com.github.fungal.spi.deployers.Context context, ClassLoader parent)protected ClassLoadergetDeploymentClassLoader(String uniqueId)protected StringgetDriver(String driverName, String moduleId)Get the driverprotected FilegetFileFromUrl(URL url)Get File object of URL who locate xml resourceprotected StringgetIronJacamarHome()Get IronJacamar Home directoryStringgetJDBCLocal()Get the name for the JDBC Local resource adapterStringgetJDBCXA()Get the name for the JDBC Xa resource adapterprotected DeployersLoggergetLogger()MetadataRepositorygetMetadataRepository()Get the metadata repositoryintgetOrder()ResourceAdapterRepositorygetResourceAdapterRepository()Get the resource adapter repositoryprotected SubjectFactorygetSubjectFactory(Credential credential, String jndiName)ObjectinitAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl)Initialize and inject configuration propertiesprotected StringregisterResourceAdapterToResourceAdapterRepository(jakarta.resource.spi.ResourceAdapter instance)voidsetDriverRegistry(DriverRegistry value)Set the driver registryvoidsetJDBCLocal(String value)Set the name for the JDBC Local resource adaptervoidsetJDBCXA(String value)Set the name for the JDBC XA resource adaptervoidsetMetadataRepository(MetadataRepository value)Set the metadata repositoryvoidsetResourceAdapterRepository(ResourceAdapterRepository value)Set the resource adapter repositoryvoidstart()Start-
Methods inherited from class org.jboss.jca.deployers.common.AbstractDsDeployer
associateResourceAdapter, buildJndiName, createObjectsAndInjectValue, createSubject, getCachedConnectionManager, getManagementRepository, getTransactionIntegration, getXAResourceRecoveryRegistry, initAndInjectClassLoaderPlugin, needsBootstrapContext, numberOfDataSources, setCachedConnectionManager, setManagementRepository, setTransactionIntegration, setXAResourceRecoveryRegistry, startContext, verifyTypes
-
-
-
-
Method Detail
-
setJDBCLocal
public void setJDBCLocal(String value)
Set the name for the JDBC Local resource adapter- Parameters:
value- The value
-
getJDBCLocal
public String getJDBCLocal()
Get the name for the JDBC Local resource adapter- Returns:
- The value
-
setJDBCXA
public void setJDBCXA(String value)
Set the name for the JDBC XA resource adapter- Parameters:
value- The value
-
getJDBCXA
public String getJDBCXA()
Get the name for the JDBC Xa resource adapter- Returns:
- The value
-
getLogger
protected DeployersLogger getLogger()
- Specified by:
getLoggerin classAbstractDsDeployer
-
setDriverRegistry
public void setDriverRegistry(DriverRegistry value)
Set the driver registry- Parameters:
value- The value
-
accepts
public boolean accepts(URL url)
- Specified by:
acceptsin interfacecom.github.fungal.spi.deployers.Deployer
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfacecom.github.fungal.spi.deployers.Deployer
-
deploy
public com.github.fungal.spi.deployers.Deployment deploy(URL url, com.github.fungal.spi.deployers.Context context, ClassLoader parent) throws com.github.fungal.spi.deployers.DeployException
- Specified by:
deployin interfacecom.github.fungal.spi.deployers.Deployer- Throws:
com.github.fungal.spi.deployers.DeployException
-
getFileFromUrl
protected File getFileFromUrl(URL url) throws URISyntaxException, IOException
Get File object of URL who locate xml resource- Parameters:
url- url of the archive- Returns:
- a File object pointing of xml resource
- Throws:
URISyntaxException- Thrown if the resource adapter cant be foundIOException- Thrown if the resource adapter cant be accessible
-
getIronJacamarHome
protected String getIronJacamarHome()
Get IronJacamar Home directory- Returns:
- a String object
-
cleanTemporaryFiles
protected void cleanTemporaryFiles(URL url) throws com.github.fungal.spi.deployers.DeployException
Clean all potential temporary files- Parameters:
url- url of the archive- Throws:
com.github.fungal.spi.deployers.DeployException- Thrown if the resource cant be cleaned
-
initAndInject
public Object initAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl) throws DeployException
Initialize and inject configuration properties- Specified by:
initAndInjectin classAbstractDsDeployer- Parameters:
className- The fully qualified class nameconfigs- The configuration propertiescl- The class loader- Returns:
- The object
- Throws:
DeployException- Thrown if the object cant be initialized
-
bindConnectionFactory
protected String[] bindConnectionFactory(String deployment, String jndi, Object cf) throws Throwable
Bind connection factory into JNDI- Specified by:
bindConnectionFactoryin classAbstractDsDeployer- Parameters:
deployment- The deployment namejndi- The JNDI namecf- The connection factory- Returns:
- The JNDI names bound
- Throws:
Throwable- thrown if an error occurs
-
getDriver
protected String getDriver(String driverName, String moduleId)
Get the driver- Overrides:
getDriverin classAbstractDsDeployer- Parameters:
driverName- The name of the drivermoduleId- The id of the module- Returns:
- The driver class name; or
nullif not found
-
start
public void start()
Start
-
getDeploymentClassLoader
protected ClassLoader getDeploymentClassLoader(String uniqueId)
- Specified by:
getDeploymentClassLoaderin classAbstractDsDeployer
-
getSubjectFactory
protected SubjectFactory getSubjectFactory(Credential credential, String jndiName) throws DeployException
- Specified by:
getSubjectFactoryin classAbstractDsDeployer- Throws:
DeployException
-
createRa
protected jakarta.resource.spi.ResourceAdapter createRa(String uniqueId, ClassLoader cl) throws NotFoundException, Exception, com.github.fungal.spi.deployers.DeployException
- Specified by:
createRain classAbstractDsDeployer- Throws:
NotFoundExceptionExceptioncom.github.fungal.spi.deployers.DeployException
-
registerResourceAdapterToResourceAdapterRepository
protected String registerResourceAdapterToResourceAdapterRepository(jakarta.resource.spi.ResourceAdapter instance)
- Specified by:
registerResourceAdapterToResourceAdapterRepositoryin classAbstractDsDeployer
-
createMcf
protected jakarta.resource.spi.ManagedConnectionFactory createMcf(XaDataSource ds, String uniqueId, ClassLoader cl) throws NotFoundException, Exception, com.github.fungal.spi.deployers.DeployException
- Specified by:
createMcfin classAbstractDsDeployer- Throws:
NotFoundExceptionExceptioncom.github.fungal.spi.deployers.DeployException
-
createMcf
protected jakarta.resource.spi.ManagedConnectionFactory createMcf(DataSource ds, String uniqueId, ClassLoader cl) throws NotFoundException, Exception, com.github.fungal.spi.deployers.DeployException
- Specified by:
createMcfin classAbstractDsDeployer- Throws:
NotFoundExceptionExceptioncom.github.fungal.spi.deployers.DeployException
-
setMetadataRepository
public void setMetadataRepository(MetadataRepository value)
Set the metadata repository- Parameters:
value- The value
-
getMetadataRepository
public MetadataRepository getMetadataRepository()
Get the metadata repository- Returns:
- The handle
-
setResourceAdapterRepository
public void setResourceAdapterRepository(ResourceAdapterRepository value)
Set the resource adapter repository- Parameters:
value- The value
-
getResourceAdapterRepository
public ResourceAdapterRepository getResourceAdapterRepository()
Get the resource adapter repository- Returns:
- The handle
-
-