|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.deployer.AbsDeployer
org.objectweb.easybeans.deployer.AbsWebContainerDeployer
org.objectweb.easybeans.deployer.TomcatDeployer
public class TomcatDeployer
Implementation of the Deployer for EasyBeans in Tomcat.
It will deploy EJB3 and EAR. EJB3 will be deployed in EasyBeans while WAR
file will go in Tomcat.
Field Summary | |
---|---|
private static java.lang.String |
CATALINA_CONTEXT_CLASSNAME
Name of the Standard Context class. |
private java.lang.Class |
catalinaContextClass
Class object for the catalina context. |
private static java.lang.String |
DESTROY_OPERATION
Destroy operation on the Tomcat context to undeploy the war. |
private static java.lang.String |
ENGINE_OBJECT_NAME
Engine Object Name. |
private static JLog |
logger
Logger. |
private static java.lang.String |
SET_DEFAULT_CONTEXT_XML_METHOD_NAME
Method name for setting the default context xml file. |
private static java.lang.String |
SET_DEFAULT_WEB_XML_METHOD_NAME
Method name for setting the default web xml file. |
private static java.lang.String |
SET_DOC_BASE_METHOD_NAME
Method name for setting the URL to the war file. |
private static java.lang.String |
SET_JAVA_DELEGATION_MODEL_METHOD_NAME
Name of the method for changing the Java Delegation model. |
private static java.lang.String |
SET_PARENT_CLASSLOADER_METHOD_NAME
Method name for setting the parent class loader on the context. |
private static java.lang.String |
SET_PATH_METHOD_NAME
Method name for setting the context-root of this context. |
private java.lang.reflect.Method |
setDefaultContextXmlMethod
Method for setting the default context xml file. |
private java.lang.reflect.Method |
setDefaultWebXmlMethod
Method for setting the default web xml file. |
private java.lang.reflect.Method |
setDocBaseMethod
Method for setting the URL to the doc base. |
private java.lang.reflect.Method |
setJavaDelegationModelMethod
Method object used for changing the Java Delegation model. |
private java.lang.reflect.Method |
setParentClassLoaderMethod
Method for setting the parent class loader on the context. |
private java.lang.reflect.Method |
setPathMethod
Method for setting the context-root of this context. |
private static java.lang.String |
START_METHOD_NAME
Name of the start method for the context object. |
private java.lang.reflect.Method |
startContextMethod
Method for the start of the catalina context. |
Fields inherited from class org.objectweb.easybeans.deployer.AbsDeployer |
---|
DEFAULT_FOLDER |
Constructor Summary | |
---|---|
TomcatDeployer()
Build a new instance of this deployer. |
Method Summary | |
---|---|
private java.lang.String |
buildObjectName(WARDeployable war)
Build an objectname for the given war. |
private void |
checkSupportedDeployable(EZBDeployable deployable)
Check that the given deployable is supported by this deployer. |
void |
deploy(EZBDeployable deployable)
Deploy a deployable. |
protected void |
deployWARs(EARDeployable earDeployable,
java.net.URL earURL,
java.lang.ClassLoader earClassLoader,
java.lang.ClassLoader parentClassLoader)
Deploy the WAR files present in the given EAR. |
private java.lang.String |
getDefaultHost()
|
private java.lang.String |
getDomain()
Gets the JMX domain of Tomcat. |
private javax.management.ObjectName |
getEngineObjectName()
|
protected void |
undeployWAR(WARDeployable warDeployable)
Undeploy an given WAR (called by the undeploy method). |
private java.io.File |
unpack(java.io.File warFile,
WARDeployable war,
java.net.URL earURL)
Unpack the given war into a temp directory. |
Methods inherited from class org.objectweb.easybeans.deployer.AbsWebContainerDeployer |
---|
deployEAR, undeploy, undeployEAR |
Methods inherited from class org.objectweb.easybeans.deployer.AbsDeployer |
---|
deployEJB, getClassLoaderForEAR, getEmbedded, getMethod, getPersistenceUnitManager, invoke, loadClass, loadClass, newInstance, newInstance, setEmbedded, undeployEJB3FromEAR, unpackEARDeployable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.easybeans.deployer.api.EZBDeployer |
---|
setEmbedded, undeploy |
Field Detail |
---|
private static JLog logger
private static final java.lang.String CATALINA_CONTEXT_CLASSNAME
private java.lang.Class catalinaContextClass
private static final java.lang.String START_METHOD_NAME
private java.lang.reflect.Method startContextMethod
private static final java.lang.String SET_PARENT_CLASSLOADER_METHOD_NAME
private java.lang.reflect.Method setParentClassLoaderMethod
private static final java.lang.String SET_DOC_BASE_METHOD_NAME
private java.lang.reflect.Method setDocBaseMethod
private static final java.lang.String SET_PATH_METHOD_NAME
private java.lang.reflect.Method setPathMethod
private static final java.lang.String SET_DEFAULT_CONTEXT_XML_METHOD_NAME
private java.lang.reflect.Method setDefaultContextXmlMethod
private static final java.lang.String SET_DEFAULT_WEB_XML_METHOD_NAME
private static final java.lang.String SET_JAVA_DELEGATION_MODEL_METHOD_NAME
private java.lang.reflect.Method setJavaDelegationModelMethod
private java.lang.reflect.Method setDefaultWebXmlMethod
private static final java.lang.String ENGINE_OBJECT_NAME
private static final java.lang.String DESTROY_OPERATION
Constructor Detail |
---|
public TomcatDeployer() throws EZBDeployerException
EZBDeployerException
- if the instance is not built.Method Detail |
---|
public void deploy(EZBDeployable deployable) throws EZBDeployerException
deploy
in interface EZBDeployer
deployable
- a given deployable
EZBDeployerException
- if the deployment is not done.protected void deployWARs(EARDeployable earDeployable, java.net.URL earURL, java.lang.ClassLoader earClassLoader, java.lang.ClassLoader parentClassLoader) throws EZBDeployerException
deployWARs
in class AbsWebContainerDeployer
earDeployable
- the EAR containing the WARsearURL
- the EAR URLearClassLoader
- the EAR classloaderparentClassLoader
- the parent classloader (EJB) to use
EZBDeployerException
- if the wars are not deployed.private void checkSupportedDeployable(EZBDeployable deployable) throws EZBDeployerException
deployable
- the deployable that needs to be deployed
EZBDeployerException
- if this deployable is not supported.protected void undeployWAR(WARDeployable warDeployable) throws EZBDeployerException
undeployWAR
in class AbsWebContainerDeployer
warDeployable
- a given WAR deployable
EZBDeployerException
- if the undeployment is not done.private java.lang.String buildObjectName(WARDeployable war) throws EZBDeployerException
war
- the given war deployable that contains the datas.
EZBDeployerException
- if the object name cannot be built.private java.lang.String getDomain() throws EZBDeployerException
EZBDeployerException
- if the domain cannot be foundprivate javax.management.ObjectName getEngineObjectName() throws EZBDeployerException
EZBDeployerException
- if the engine object name is not found in
the MBean server.private java.lang.String getDefaultHost() throws EZBDeployerException
EZBDeployerException
- if the MBean is not found.private java.io.File unpack(java.io.File warFile, WARDeployable war, java.net.URL earURL) throws EZBDeployerException
warFile
- the war to unpackwar
- data on the given warearURL
- url of the EAR that contains the war
EZBDeployerException
- if unpack fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |