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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected 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(org.jboss.jca.common.api.metadata.ds.DataSource ds, String uniqueId, ClassLoader cl) protected jakarta.resource.spi.ManagedConnectionFactorycreateMcf(org.jboss.jca.common.api.metadata.ds.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 StringGet the driverprotected FilegetFileFromUrl(URL url) Get File object of URL who locate xml resourceprotected StringGet IronJacamar Home directoryGet the name for the JDBC Local resource adapterGet the name for the JDBC Xa resource adapterprotected DeployersLoggerGet the metadata repositoryintgetOrder()Get the resource adapter repositoryprotected SubjectFactorygetSubjectFactory(org.jboss.jca.common.api.metadata.common.Credential credential, String jndiName) initAndInject(String className, List<? extends org.jboss.jca.common.api.metadata.spec.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 adaptervoidSet the name for the JDBC XA resource adaptervoidSet the metadata repositoryvoidSet the resource adapter repositoryvoidstart()StartMethods 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
-
Constructor Details
-
DsXmlDeployer
public DsXmlDeployer()Constructor
-
-
Method Details
-
setJDBCLocal
Set the name for the JDBC Local resource adapter- Parameters:
value- The value
-
getJDBCLocal
Get the name for the JDBC Local resource adapter- Returns:
- The value
-
setJDBCXA
Set the name for the JDBC XA resource adapter- Parameters:
value- The value
-
getJDBCXA
Get the name for the JDBC Xa resource adapter- Returns:
- The value
-
getLogger
- Specified by:
getLoggerin classAbstractDsDeployer
-
setDriverRegistry
Set the driver registry- Parameters:
value- The value
-
accepts
- 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
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
Get IronJacamar Home directory- Returns:
- a String object
-
cleanTemporaryFiles
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 org.jboss.jca.common.api.metadata.spec.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
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
- Specified by:
getDeploymentClassLoaderin classAbstractDsDeployer
-
getSubjectFactory
protected SubjectFactory getSubjectFactory(org.jboss.jca.common.api.metadata.common.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(org.jboss.jca.common.api.metadata.ds.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(org.jboss.jca.common.api.metadata.ds.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
Set the metadata repository- Parameters:
value- The value
-
getMetadataRepository
Get the metadata repository- Returns:
- The handle
-
setResourceAdapterRepository
Set the resource adapter repository- Parameters:
value- The value
-
getResourceAdapterRepository
Get the resource adapter repository- Returns:
- The handle
-