
public abstract class AbstractResourceAdapterDeployer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DeployersLogger |
log
the logger
|
protected boolean |
trace
trace boolean check
|
protected boolean |
validateClasses
boolean to set if validation is needed at class level or it should be considered already valid
(IOW object put in repository at previous steps have been already validated at class level
|
| Constructor and Description |
|---|
AbstractResourceAdapterDeployer(boolean validateClasses)
Create a new AbstractResourceAdapterDeployer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyCapacity(org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition connectionDefinition,
org.jboss.jca.core.connectionmanager.pool.api.Pool pool)
Apply capacity
|
protected void |
associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter,
Object object)
Associate resource adapter with ojects if they implement ResourceAdapterAssociation
|
protected abstract String[] |
bindAdminObject(URL url,
String deploymentName,
Object ao)
Bind admin object into JNDI
|
protected abstract String[] |
bindAdminObject(URL url,
String deploymentName,
Object ao,
String jndiName)
Bind admin object into JNDI
|
protected abstract String[] |
bindConnectionFactory(URL url,
String deploymentName,
Object cf)
Bind connection factory into JNDI
|
protected abstract String[] |
bindConnectionFactory(URL url,
String deploymentName,
Object cf,
String jndiName)
Bind connection factory into JNDI
|
protected String |
buildJndiName(String jndiName,
Boolean javaContext)
Build the jndi name
|
protected abstract boolean |
checkActivation(org.jboss.jca.common.api.metadata.spec.Connector cmd,
org.jboss.jca.common.api.metadata.resourceadapter.Activation activation)
Check if the resource adapter should be activated based on the ironjacamar.xml input
|
protected abstract boolean |
checkConfigurationIsValid()
check if the configuration for this deployer has been set to a valid value
|
protected CommonDeployment |
createObjectsAndInjectValue(URL url,
String deploymentName,
File root,
ClassLoader cl,
org.jboss.jca.common.api.metadata.spec.Connector cmd,
org.jboss.jca.common.api.metadata.resourceadapter.Activation activation)
create objects and inject value for this deployment.
|
protected org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration |
createPoolConfiguration(org.jboss.jca.common.api.metadata.common.Pool pp,
org.jboss.jca.common.api.metadata.common.TimeOut tp,
org.jboss.jca.common.api.metadata.common.Validation vp)
Create an instance of the pool configuration based on the input
|
protected Subject |
createSubject(org.jboss.jca.core.spi.security.SubjectFactory subjectFactory,
String securityDomain,
javax.resource.spi.ManagedConnectionFactory mcf)
Create a subject
|
protected Set<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> |
findAdminObjects(String clz,
Set<String> aos,
List<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> defs)
Find the metadata for an admin object
|
protected Set<org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition> |
findConnectionDefinitions(String clz,
Set<String> mcfs,
List<org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition> defs,
ClassLoader cl)
Find the metadata for a managed connection factory
|
protected BeanValidation |
getBeanValidation()
Get the bean validation module
|
protected abstract org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager |
getCachedConnectionManager()
Get the cached connection manager
|
Configuration |
getConfiguration()
Get the configuration
|
protected abstract DeployersLogger |
getLogger()
Get the logger
|
protected abstract PrintWriter |
getLogPrintWriter()
get a PrintWriter where logger will put its output
|
protected abstract File |
getReportDirectory()
get The directory where write error reports
|
protected abstract org.jboss.jca.core.spi.security.SubjectFactory |
getSubjectFactory(String securityDomain)
Get a subject factory
|
protected abstract org.jboss.jca.core.spi.transaction.TransactionIntegration |
getTransactionIntegration()
Get the transaction integration.
|
protected abstract TransactionManager |
getTransactionManager()
Get the transaction Manager.
|
protected boolean |
hasFailuresLevel(Collection<org.jboss.jca.validator.Failure> failures,
int severity)
Cehck for failures at a certain level
|
protected Set<org.jboss.jca.validator.Failure> |
initActivationSpec(ClassLoader cl,
org.jboss.jca.common.api.metadata.spec.Connector cmd,
javax.resource.spi.ResourceAdapter resourceAdapter,
List<org.jboss.jca.validator.Validate> archiveValidationObjects,
List<Object> beanValidationObjects,
Set<org.jboss.jca.validator.Failure> failures,
URL url,
boolean activateDeployment)
init the acrtivation spec
|
protected Set<org.jboss.jca.validator.Failure> |
initAdminObject(org.jboss.jca.common.api.metadata.spec.Connector cmd,
ClassLoader cl,
List<org.jboss.jca.validator.Validate> archiveValidationObjects,
List<Object> beanValidationObjects,
Set<org.jboss.jca.validator.Failure> failures,
URL url,
String deploymentName,
boolean activateDeployment,
javax.resource.spi.ResourceAdapter resourceAdapter,
List<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> aosAct,
List<Object> aos,
List<String> aoJndiNames,
org.jboss.jca.core.api.management.Connector mgtConnector)
init an Admin Object
|
protected abstract Object |
initAndInject(String value,
List<? extends org.jboss.jca.common.api.metadata.spec.ConfigProperty> cpm,
ClassLoader cl)
Initialize and inject configuration properties into container
|
String |
printFailuresLog(String urlFileName,
org.jboss.jca.validator.Validator validator,
Collection<org.jboss.jca.validator.Failure> failures,
File reportDirectory,
org.jboss.jca.validator.FailureHelper... fhInput)
print Failures into Log files.
|
protected abstract void |
registerResourceAdapterToMDR(URL url,
File root,
org.jboss.jca.common.api.metadata.spec.Connector cmd,
org.jboss.jca.common.api.metadata.resourceadapter.Activation activation)
Register the ResourceAdapter to the MDR.
|
protected abstract String |
registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
Register the ResourceAdapter to the ResourceAdapterRepository.
|
protected boolean |
requireExplicitJndiBindings()
Require explicit JNDI bindings
|
protected boolean |
scanArchive(org.jboss.jca.common.api.metadata.spec.Connector cmd)
Should the archive be scanned for annotations
|
void |
setConfiguration(Configuration value)
Set the configuration
|
protected abstract void |
setRecoveryForResourceAdapterInResourceAdapterRepository(String key,
boolean isXA)
Set recovery mode for a resource adapter in the ResourceAdapterRepository
|
void |
start()
Start
|
protected void |
startContext(javax.resource.spi.ResourceAdapter resourceAdapter,
String bootstrapContextIdentifier,
String bootstrapContextName,
org.jboss.jca.core.spi.security.Callback cb)
Start the resource adapter
|
Set<org.jboss.jca.validator.Failure> |
validateArchive(URL url,
List<org.jboss.jca.validator.Validate> archiveValidation,
Set<org.jboss.jca.validator.Failure> failures)
validate archive
|
protected final DeployersLogger log
protected final boolean trace
protected final boolean validateClasses
public AbstractResourceAdapterDeployer(boolean validateClasses)
validateClasses - validateClasses validateClasses boolean to express if this instance will
apply validation on classes structurepublic void setConfiguration(Configuration value)
value - value value The valuepublic Configuration getConfiguration()
public Set<org.jboss.jca.validator.Failure> validateArchive(URL url, List<org.jboss.jca.validator.Validate> archiveValidation, Set<org.jboss.jca.validator.Failure> failures)
url - url url of the archivearchiveValidation - archiveValidation archiveValidation classes and/or to validate.failures - failures failures original list of failures#getArchiveValidation() Setting. It returns null also if
the concrete implementation of this class set validateClasses instance variable to flase and the list of
archiveValidation contains one or more instance of ValidateClass typepublic String printFailuresLog(String urlFileName, org.jboss.jca.validator.Validator validator, Collection<org.jboss.jca.validator.Failure> failures, File reportDirectory, org.jboss.jca.validator.FailureHelper... fhInput)
urlFileName - urlFileName urlFileName filename Of deployed rarvalidator - validator validator validator instance used to run validation rulesfailures - failures failures the list of Failures to be printedreportDirectory - reportDirectory reportDirectory where to put various logsfhInput - fhInput fhInput optional parameter. Normally used only for test or in case of
FailureHelper already present in contextprotected boolean hasFailuresLevel(Collection<org.jboss.jca.validator.Failure> failures, int severity)
failures - failures failures The failuresseverity - severity severity The levelprotected void startContext(javax.resource.spi.ResourceAdapter resourceAdapter,
String bootstrapContextIdentifier,
String bootstrapContextName,
org.jboss.jca.core.spi.security.Callback cb)
throws DeployException
resourceAdapter - The resource adapterbootstrapContextIdentifier - The bootstrap context identifierbootstrapContextName - The bootstrap context name; may be nullcb - The callbackDeployException - DeployException Thrown if the resource adapter cant be startedprotected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter,
Object object)
throws DeployException
resourceAdapter - resourceAdapter resourceAdapter The resource adapterobject - object object The of possible association objectDeployException - DeployException Thrown if the resource adapter cant be startedprotected Set<org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition> findConnectionDefinitions(String clz, Set<String> mcfs, List<org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition> defs, ClassLoader cl) throws DeployException
clz - The fully quilified class name for the managed connection factorymcfs - The managed connection facotriesdefs - The connection definitionscl - The class loadernull if none could be foundDeployException - Thrown in case of configuration errorprotected Set<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> findAdminObjects(String clz, Set<String> aos, List<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> defs) throws DeployException
clz - The fully quilified class name for the admin objectaos - The admin object classesdefs - The admin object definitionsnull if none could be foundDeployException - Thrown in case of configuration errorprotected org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration createPoolConfiguration(org.jboss.jca.common.api.metadata.common.Pool pp,
org.jboss.jca.common.api.metadata.common.TimeOut tp,
org.jboss.jca.common.api.metadata.common.Validation vp)
pp - The pool parameterstp - The timeout parametersvp - The validation parameterspublic void start()
protected Set<org.jboss.jca.validator.Failure> initActivationSpec(ClassLoader cl, org.jboss.jca.common.api.metadata.spec.Connector cmd, javax.resource.spi.ResourceAdapter resourceAdapter, List<org.jboss.jca.validator.Validate> archiveValidationObjects, List<Object> beanValidationObjects, Set<org.jboss.jca.validator.Failure> failures, URL url, boolean activateDeployment) throws DeployException
cl - clcmd - cmdresourceAdapter - resourceAdapterarchiveValidationObjects - archiveValidationObjectsbeanValidationObjects - beanValidationObjectsfailures - falures to be updated during implemented operationsurl - urlactivateDeployment - activateDeploymentDeployException - DeployException in case of errorprotected Set<org.jboss.jca.validator.Failure> initAdminObject(org.jboss.jca.common.api.metadata.spec.Connector cmd, ClassLoader cl, List<org.jboss.jca.validator.Validate> archiveValidationObjects, List<Object> beanValidationObjects, Set<org.jboss.jca.validator.Failure> failures, URL url, String deploymentName, boolean activateDeployment, javax.resource.spi.ResourceAdapter resourceAdapter, List<org.jboss.jca.common.api.metadata.resourceadapter.AdminObject> aosAct, List<Object> aos, List<String> aoJndiNames, org.jboss.jca.core.api.management.Connector mgtConnector) throws DeployException
cmd - cmdcl - clarchiveValidationObjects - archiveValidationObjectsbeanValidationObjects - beanValidationObjectsfailures - falures to be updated during implemented operationsurl - urldeploymentName - The deployment nameactivateDeployment - activateDeploymentresourceAdapter - The resource adapter instanceaosAct - Admin object definitions from activationaos - The resulting array of admin objectsaoJndiNames - The resulting array of JNDI namesmgtConnector - The management view of the connectorDeployException - DeployException in case of errorsprotected CommonDeployment createObjectsAndInjectValue(URL url, String deploymentName, File root, ClassLoader cl, org.jboss.jca.common.api.metadata.spec.Connector cmd, org.jboss.jca.common.api.metadata.resourceadapter.Activation activation) throws DeployException, javax.resource.ResourceException, org.jboss.jca.validator.ValidatorException, org.jboss.jca.core.spi.mdr.AlreadyExistsException, ClassNotFoundException, Throwable
CommonDeployment
to be used to exchange objects needed to real injection in the containerurl - urldeploymentName - deploymentNameroot - rootcl - clcmd - connector mdactivation - activation mdDeployException - DeployExceptionjavax.resource.ResourceException - ResourceExceptionorg.jboss.jca.validator.ValidatorException - ValidatorExceptionorg.jboss.jca.core.spi.mdr.AlreadyExistsException - AlreadyExistsExceptionClassNotFoundException - ClassNotFoundExceptionThrowable - Throwableprotected String buildJndiName(String jndiName, Boolean javaContext)
jndiName - The jndi namejavaContext - The java contextprotected boolean requireExplicitJndiBindings()
protected abstract org.jboss.jca.core.spi.security.SubjectFactory getSubjectFactory(String securityDomain) throws DeployException
securityDomain - The security domainnull if security domain isn't definedDeployException - Thrown if the security domain can't be resolvedprotected Subject createSubject(org.jboss.jca.core.spi.security.SubjectFactory subjectFactory, String securityDomain, javax.resource.spi.ManagedConnectionFactory mcf)
subjectFactory - The subject factorysecurityDomain - The security domainmcf - The managed connection factorynull in case of an errorprotected BeanValidation getBeanValidation()
protected abstract org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager getCachedConnectionManager()
protected void applyCapacity(org.jboss.jca.common.api.metadata.resourceadapter.ConnectionDefinition connectionDefinition,
org.jboss.jca.core.connectionmanager.pool.api.Pool pool)
connectionDefinition - The connection definitionpool - The poolprotected boolean scanArchive(org.jboss.jca.common.api.metadata.spec.Connector cmd)
cmd - The metadataprotected abstract File getReportDirectory()
Fileprotected abstract void registerResourceAdapterToMDR(URL url, File root, org.jboss.jca.common.api.metadata.spec.Connector cmd, org.jboss.jca.common.api.metadata.resourceadapter.Activation activation) throws org.jboss.jca.core.spi.mdr.AlreadyExistsException
url - urlroot - rootcmd - cmdactivation - activationorg.jboss.jca.core.spi.mdr.AlreadyExistsException - AlreadyExistsExceptionprotected abstract String registerResourceAdapterToResourceAdapterRepository(javax.resource.spi.ResourceAdapter instance)
instance - the instanceprotected abstract void setRecoveryForResourceAdapterInResourceAdapterRepository(String key, boolean isXA)
key - The key for the resource adapterisXA - Is the resource adapter XA capableprotected abstract TransactionManager getTransactionManager()
protected abstract org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()
protected abstract PrintWriter getLogPrintWriter()
protected abstract String[] bindConnectionFactory(URL url, String deploymentName, Object cf) throws Throwable
url - The deployment URLdeploymentName - The deployment namecf - The connection factoryThrowable - Thrown if an error occursprotected abstract String[] bindConnectionFactory(URL url, String deploymentName, Object cf, String jndiName) throws Throwable
url - The deployment URLdeploymentName - The deployment namecf - The connection factoryjndiName - The JNDI nameThrowable - Thrown if an error occursprotected abstract String[] bindAdminObject(URL url, String deploymentName, Object ao) throws Throwable
url - The deployment URLdeploymentName - The deployment nameao - The admin objectThrowable - Thrown if an error occursprotected abstract String[] bindAdminObject(URL url, String deploymentName, Object ao, String jndiName) throws Throwable
url - The deployment URLdeploymentName - The deployment nameao - The admin objectjndiName - The JNDI nameThrowable - Thrown if an error occursprotected abstract boolean checkConfigurationIsValid()
protected abstract boolean checkActivation(org.jboss.jca.common.api.metadata.spec.Connector cmd,
org.jboss.jca.common.api.metadata.resourceadapter.Activation activation)
cmd - cmd cmd The connector metadataactivation - The activation metadataprotected abstract Object initAndInject(String value, List<? extends org.jboss.jca.common.api.metadata.spec.ConfigProperty> cpm, ClassLoader cl) throws DeployException
value - valuecpm - confi propertiescl - The class loaderDeployException - DeployException Thrown if the object cant be initializedprotected abstract DeployersLogger getLogger()
Copyright © 2014 IronJacamar (http://www.ironjacamar.org)