org.jboss.jca.deployers.fungal
Class DsXmlDeployer

java.lang.Object
  extended by org.jboss.jca.deployers.common.AbstractDsDeployer
      extended by org.jboss.jca.deployers.fungal.DsXmlDeployer
All Implemented Interfaces:
com.github.fungal.spi.deployers.Deployer

public final class DsXmlDeployer
extends org.jboss.jca.deployers.common.AbstractDsDeployer
implements com.github.fungal.spi.deployers.Deployer

The -ds.xml deployer for JCA/SJC

Author:
Jesper Pedersen

Field Summary
protected  DriverRegistry driverRegistry
          Driver registry
protected  org.jboss.jca.core.spi.mdr.MetadataRepository mdr
          Metadata repository
 
Fields inherited from class org.jboss.jca.deployers.common.AbstractDsDeployer
transactionIntegration, xaResourceRecoveryRegistry
 
Constructor Summary
DsXmlDeployer()
          Constructor
 
Method Summary
protected  String[] bindConnectionFactory(String deployment, String jndi, Object cf)
          Bind connection factory into JNDI
protected  javax.resource.spi.ManagedConnectionFactory createMcf(org.jboss.jca.common.api.metadata.ds.DataSource ds, String uniqueId, ClassLoader cl)
           
protected  javax.resource.spi.ManagedConnectionFactory createMcf(org.jboss.jca.common.api.metadata.ds.XaDataSource ds, String uniqueId, ClassLoader cl)
           
 com.github.fungal.spi.deployers.Deployment deploy(URL url, ClassLoader parent)
          Deploy
protected  ClassLoader getDeploymentClassLoader(String uniqueId)
           
protected  String getDriver(String driverName, String moduleId)
          Get the driver
 String getJDBCLocal()
          Get the name for the JDBC Local resource adapter
 String getJDBCXA()
          Get the name for the JDBC Xa resource adapter
 com.github.fungal.api.Kernel getKernel()
          Get the kernel
protected  org.jboss.jca.deployers.DeployersLogger getLogger()
          
 org.jboss.jca.core.spi.mdr.MetadataRepository getMetadataRepository()
          Get the metadata repository
protected  org.jboss.security.SubjectFactory getSubjectFactory(String securityDomain)
           
 Object initAndInject(String className, List<? extends org.jboss.jca.common.api.metadata.ra.ConfigProperty> configs, ClassLoader cl)
          Initialize and inject configuration properties
 void setDriverRegistry(DriverRegistry value)
          Set the driver registry
 void setJDBCLocal(String value)
          Set the name for the JDBC Local resource adapter
 void setJDBCXA(String value)
          Set the name for the JDBC XA resource adapter
 void setKernel(com.github.fungal.api.Kernel value)
          Set the kernel
 void setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository value)
          Set the metadata repository
 void start()
          Start
 
Methods inherited from class org.jboss.jca.deployers.common.AbstractDsDeployer
buildJndiName, createObjectsAndInjectValue, createSubject, getCachedConnectionManager, getManagementRepository, getTransactionIntegration, getXAResourceRecoveryRegistry, initAndInjectClassLoaderPlugin, setCachedConnectionManager, setManagementRepository, setTransactionIntegration, setXAResourceRecoveryRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mdr

protected org.jboss.jca.core.spi.mdr.MetadataRepository mdr
Metadata repository


driverRegistry

protected DriverRegistry driverRegistry
Driver registry

Constructor Detail

DsXmlDeployer

public DsXmlDeployer()
Constructor

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

setKernel

public void setKernel(com.github.fungal.api.Kernel value)
Set the kernel

Parameters:
value - The value

getKernel

public com.github.fungal.api.Kernel getKernel()
Get the kernel

Returns:
The handle

getLogger

protected org.jboss.jca.deployers.DeployersLogger getLogger()

Specified by:
getLogger in class org.jboss.jca.deployers.common.AbstractDsDeployer

setDriverRegistry

public void setDriverRegistry(DriverRegistry value)
Set the driver registry

Parameters:
value - The value

deploy

public com.github.fungal.spi.deployers.Deployment deploy(URL url,
                                                         ClassLoader parent)
                                                  throws com.github.fungal.spi.deployers.DeployException
Deploy

Specified by:
deploy in interface com.github.fungal.spi.deployers.Deployer
Parameters:
url - The url
parent - The parent classloader
Returns:
The deployment
Throws:
com.github.fungal.spi.deployers.DeployException - Thrown if an error occurs during deployment

initAndInject

public Object initAndInject(String className,
                            List<? extends org.jboss.jca.common.api.metadata.ra.ConfigProperty> configs,
                            ClassLoader cl)
                     throws org.jboss.jca.deployers.common.DeployException
Initialize and inject configuration properties

Specified by:
initAndInject in class org.jboss.jca.deployers.common.AbstractDsDeployer
Parameters:
className - The fully qualified class name
configs - The configuration properties
cl - The class loader
Returns:
The object
Throws:
org.jboss.jca.deployers.common.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 org.jboss.jca.deployers.common.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 org.jboss.jca.deployers.common.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 org.jboss.jca.deployers.common.AbstractDsDeployer

getSubjectFactory

protected org.jboss.security.SubjectFactory getSubjectFactory(String securityDomain)
                                                       throws org.jboss.jca.deployers.common.DeployException
Specified by:
getSubjectFactory in class org.jboss.jca.deployers.common.AbstractDsDeployer
Throws:
org.jboss.jca.deployers.common.DeployException

createMcf

protected javax.resource.spi.ManagedConnectionFactory createMcf(org.jboss.jca.common.api.metadata.ds.XaDataSource ds,
                                                                String uniqueId,
                                                                ClassLoader cl)
                                                         throws org.jboss.jca.core.spi.mdr.NotFoundException,
                                                                Exception,
                                                                com.github.fungal.spi.deployers.DeployException
Specified by:
createMcf in class org.jboss.jca.deployers.common.AbstractDsDeployer
Throws:
org.jboss.jca.core.spi.mdr.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 org.jboss.jca.core.spi.mdr.NotFoundException,
                                                                Exception,
                                                                com.github.fungal.spi.deployers.DeployException
Specified by:
createMcf in class org.jboss.jca.deployers.common.AbstractDsDeployer
Throws:
org.jboss.jca.core.spi.mdr.NotFoundException
Exception
com.github.fungal.spi.deployers.DeployException

setMetadataRepository

public void setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository value)
Set the metadata repository

Parameters:
value - The value

getMetadataRepository

public org.jboss.jca.core.spi.mdr.MetadataRepository getMetadataRepository()
Get the metadata repository

Returns:
The handle


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)