org.jboss.jca.deployers.fungal
Class AbstractFungalRADeployer

java.lang.Object
  extended by org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
      extended by org.jboss.jca.deployers.fungal.AbstractFungalRADeployer
Direct Known Subclasses:
RAActivator, RADeployer, RaXmlDeployer

public abstract class AbstractFungalRADeployer
extends org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

An abstract resource adapter deployer which contains common functionality for all resource adapter archive based deployers.

Author:
Jesper Pedersen

Field Summary
protected  com.github.fungal.api.Kernel kernel
          The kernel
 
Fields inherited from class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
log, trace, validateClasses
 
Constructor Summary
AbstractFungalRADeployer(boolean validateClasses, org.jboss.logging.Logger log)
          Create a new AbstractResourceAdapterDeployer.
 
Method Summary
 String[] bindAdminObject(URL url, String deployment, Object ao)
           
 String[] bindAdminObject(URL url, String deployment, Object ao, String jndi)
           
 String[] bindConnectionFactory(URL url, String deployment, Object cf)
           
 String[] bindConnectionFactory(URL url, String deployment, Object cf, String jndi)
           
protected  boolean checkConfigurationIsValid()
           
 com.github.fungal.api.Kernel getKernel()
          Get the kernel
protected  PrintWriter getLogPrintWriter()
           
protected  File getReportDirectory()
           
protected  org.jboss.security.SubjectFactory getSubjectFactory(String securityDomain)
           
protected  org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()
           
protected  TransactionManager getTransactionManager()
           
protected  URL[] getUrls(File directory)
          Get the URLs for the directory and all libraries located in the directory
 Object initAndInject(String className, List<? extends org.jboss.jca.common.api.metadata.ra.ConfigProperty> configs, ClassLoader cl)
          Initialize and inject configuration properties
protected  List<ObjectName> registerManagementView(org.jboss.jca.core.api.management.Connector mgtConnector, MBeanServer server)
          Register management view of a connector in JMX
protected  void registerResourceAdapterToMDR(URL url, File root, org.jboss.jca.common.api.metadata.ra.Connector cmd, org.jboss.jca.common.api.metadata.ironjacamar.IronJacamar ijmd)
           
protected  String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
           
 void setKernel(com.github.fungal.api.Kernel kernel)
          Set the kernel
 void start()
          Start
 
Methods inherited from class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
associateResourceAdapter, checkActivation, createObjectsAndInjectValue, createObjectsAndInjectValue, createPoolConfiguration, findAdminObject, findConnectionDefinition, getConfiguration, hasFailuresLevel, initActivationSpec, initAdminObject, printFailuresLog, setConfiguration, startContext, validateArchive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kernel

protected com.github.fungal.api.Kernel kernel
The kernel

Constructor Detail

AbstractFungalRADeployer

public AbstractFungalRADeployer(boolean validateClasses,
                                org.jboss.logging.Logger log)
Create a new AbstractResourceAdapterDeployer.

Parameters:
validateClasses - boolean to express if this instance will apply validation on classes structure
log - the right log where put messages
Method Detail

getKernel

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

Returns:
The kernel

setKernel

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

Parameters:
kernel - The kernel

start

public void start()
Start

Overrides:
start in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

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.AbstractResourceAdapterDeployer
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

getUrls

protected URL[] getUrls(File directory)
                 throws MalformedURLException,
                        IOException
Get the URLs for the directory and all libraries located in the directory

Parameters:
directory - The directory
Returns:
The URLs
Throws:
MalformedURLException - MalformedURLException
IOException - IOException

bindConnectionFactory

public String[] bindConnectionFactory(URL url,
                                      String deployment,
                                      Object cf)
                               throws Throwable
Specified by:
bindConnectionFactory in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
Throws:
Throwable

bindConnectionFactory

public String[] bindConnectionFactory(URL url,
                                      String deployment,
                                      Object cf,
                                      String jndi)
                               throws Throwable
Specified by:
bindConnectionFactory in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
Throws:
Throwable

bindAdminObject

public String[] bindAdminObject(URL url,
                                String deployment,
                                Object ao)
                         throws Throwable
Specified by:
bindAdminObject in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
Throws:
Throwable

bindAdminObject

public String[] bindAdminObject(URL url,
                                String deployment,
                                Object ao,
                                String jndi)
                         throws Throwable
Specified by:
bindAdminObject in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
Throws:
Throwable

getReportDirectory

protected File getReportDirectory()
Specified by:
getReportDirectory in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

checkConfigurationIsValid

protected boolean checkConfigurationIsValid()
Specified by:
checkConfigurationIsValid in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

getLogPrintWriter

protected PrintWriter getLogPrintWriter()
Specified by:
getLogPrintWriter in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

getTransactionManager

protected TransactionManager getTransactionManager()
Specified by:
getTransactionManager in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

getTransactionIntegration

protected org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()
Specified by:
getTransactionIntegration in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

registerResourceAdapterToMDR

protected void registerResourceAdapterToMDR(URL url,
                                            File root,
                                            org.jboss.jca.common.api.metadata.ra.Connector cmd,
                                            org.jboss.jca.common.api.metadata.ironjacamar.IronJacamar ijmd)
                                     throws org.jboss.jca.core.spi.mdr.AlreadyExistsException
Specified by:
registerResourceAdapterToMDR in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer
Throws:
org.jboss.jca.core.spi.mdr.AlreadyExistsException

registerResourceAdapterToResourceAdapterRepository

protected String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
Specified by:
registerResourceAdapterToResourceAdapterRepository in class org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer

registerManagementView

protected List<ObjectName> registerManagementView(org.jboss.jca.core.api.management.Connector mgtConnector,
                                                  MBeanServer server)
                                           throws JMException
Register management view of a connector in JMX

Parameters:
mgtConnector - The management view of the connector
server - The MBeanServer instance
Returns:
The ObjectName's generated for this connector
Throws:
JMException - Thrown in case of an error

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.AbstractResourceAdapterDeployer
Throws:
org.jboss.jca.deployers.common.DeployException


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