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
  • Constructor Details

    • DsXmlDeployer

      public DsXmlDeployer()
      Constructor
  • Method Details

    • 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:
      getLogger in class AbstractDsDeployer
    • setDriverRegistry

      public void setDriverRegistry(DriverRegistry value)
      Set the driver registry
      Parameters:
      value - The value
    • accepts

      public boolean accepts(URL url)
      Specified by:
      accepts in interface com.github.fungal.spi.deployers.Deployer
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface com.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:
      deploy in interface com.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 found
      IOException - 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 org.jboss.jca.common.api.metadata.spec.ConfigProperty> configs, ClassLoader cl) throws DeployException
      Initialize and inject configuration properties
      Specified by:
      initAndInject in class AbstractDsDeployer
      Parameters:
      className - The fully qualified class name
      configs - The configuration properties
      cl - 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:
      bindConnectionFactory in class AbstractDsDeployer
      Parameters:
      deployment - The deployment name
      jndi - The JNDI name
      cf - 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:
      getDriver in class AbstractDsDeployer
      Parameters:
      driverName - The name of the driver
      moduleId - The id of the module
      Returns:
      The driver class name; or null if not found
    • start

      public void start()
      Start
    • getDeploymentClassLoader

      protected ClassLoader getDeploymentClassLoader(String uniqueId)
      Specified by:
      getDeploymentClassLoader in class AbstractDsDeployer
    • getSubjectFactory

      protected SubjectFactory getSubjectFactory(org.jboss.jca.common.api.metadata.common.Credential credential, String jndiName) throws DeployException
      Specified by:
      getSubjectFactory in class AbstractDsDeployer
      Throws:
      DeployException
    • createRa

      protected javax.resource.spi.ResourceAdapter createRa(String uniqueId, ClassLoader cl) throws NotFoundException, Exception, com.github.fungal.spi.deployers.DeployException
      Specified by:
      createRa in class AbstractDsDeployer
      Throws:
      NotFoundException
      Exception
      com.github.fungal.spi.deployers.DeployException
    • registerResourceAdapterToResourceAdapterRepository

      protected String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
      Specified by:
      registerResourceAdapterToResourceAdapterRepository in class AbstractDsDeployer
    • createMcf

      protected javax.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:
      createMcf in class AbstractDsDeployer
      Throws:
      NotFoundException
      Exception
      com.github.fungal.spi.deployers.DeployException
    • createMcf

      protected javax.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:
      createMcf in class AbstractDsDeployer
      Throws:
      NotFoundException
      Exception
      com.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