|
|||||||||
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.JettyDeployer
public class JettyDeployer
Implementation of the Deployer for EasyBeans in Jetty.
It will deploy EJB3 and EAR. EJB3 will be deployed in EasyBeans while WAR
file will go in Jetty.
Field Summary | |
---|---|
private static java.lang.String |
ADD_HANDLER_METHOD_NAME
Name of the method used to add an handler. |
private java.lang.reflect.Method |
addHandlerMethod
Method object used to add an handler. |
private java.lang.Object |
contexts
List of the contexts deployed on the current jetty server. |
private static java.lang.String |
GET_ALL_HANDLER_METHOD_NAME
Name of the method used to get all handlers. |
private static java.lang.String |
GET_CHILD_HANDLER_METHOD_NAME
Name of the method used to get the child handler on the server object. |
private static java.lang.String |
GET_CONTEXT_METHOD_NAME
Name of the method used to get the name of the context on the web app context. |
private java.lang.reflect.Method |
getContextPathMethod
Method object used to get the name of the context on the web app context. |
private java.lang.reflect.Method |
getHandlersMethod
Method object used to get all handlers. |
private static java.lang.String |
HANDLER_CLASS_NAME
Name of the class that is an handler. |
private static java.lang.String |
HANDLER_COLLECTION_CLASS_NAME
Name of the class that represent an handler collection. |
private java.lang.reflect.Method |
javaDelegationModelMethod
Method object used for changing the Java Delegation model. |
private static java.lang.Object |
jettyServer
Link to the Jetty Server used to deploy the web applications. |
private static JLog |
logger
Logger. |
private static java.lang.String |
REMOVE_HANDLER_METHOD_NAME
Name of the method used to remove an handler. |
private java.lang.reflect.Method |
removeHandlerMethod
Method object used to remove an handler. |
private static java.lang.String |
SET_CONTEXT_METHOD_NAME
Name of the method used to set the name of the context on the web app context. |
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_WAR_METHOD_NAME
Name of the method used to set the URL of the war file on the web app context. |
private java.lang.reflect.Method |
setContextPathMethod
Method object used to set the name of the context on the web app context. |
private java.lang.reflect.Method |
setWarMethod
Method object used to set the URL of the war file on the web app context. |
private static java.lang.String |
START_CONTEXT_METHOD_NAME
Name of the method used to start the web app context. |
private java.lang.reflect.Method |
startContextMethod
Method object used to start the web app context. |
private static java.lang.String |
STOP_CONTEXT_METHOD_NAME
Name of the method used to stop the web app context. |
private java.lang.reflect.Method |
stopContextMethod
Method object used to stop the web app context. |
private static java.lang.String |
WEB_APP_CONTEXT_CLASS_NAME
Name of the WebAppContext class used to deploy a war file. |
private java.lang.Class |
webAppContextClass
WebAppContext class used to deploy a war file. |
Fields inherited from class org.objectweb.easybeans.deployer.AbsDeployer |
---|
DEFAULT_FOLDER |
Constructor Summary | |
---|---|
JettyDeployer()
Build a new instance of this deployer. |
Method Summary | |
---|---|
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 static java.lang.ClassLoader |
getClassLoader()
|
static void |
setContextEvent(javax.servlet.ServletContextEvent contextEvent)
Set the given context event object. |
protected void |
undeployWAR(WARDeployable warDeployable)
Undeploy an given WAR (called by the undeploy method). |
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 java.lang.Object jettyServer
private static final java.lang.String WEB_APP_CONTEXT_CLASS_NAME
private java.lang.Class webAppContextClass
private static final java.lang.String GET_CHILD_HANDLER_METHOD_NAME
private static final java.lang.String HANDLER_COLLECTION_CLASS_NAME
private java.lang.Object contexts
private static final java.lang.String SET_WAR_METHOD_NAME
private java.lang.reflect.Method setWarMethod
private static final java.lang.String SET_CONTEXT_METHOD_NAME
private java.lang.reflect.Method setContextPathMethod
private static final java.lang.String GET_CONTEXT_METHOD_NAME
private java.lang.reflect.Method getContextPathMethod
private static final java.lang.String START_CONTEXT_METHOD_NAME
private java.lang.reflect.Method startContextMethod
private static final java.lang.String STOP_CONTEXT_METHOD_NAME
private java.lang.reflect.Method stopContextMethod
private static final java.lang.String HANDLER_CLASS_NAME
private static final java.lang.String ADD_HANDLER_METHOD_NAME
private java.lang.reflect.Method addHandlerMethod
private static final java.lang.String REMOVE_HANDLER_METHOD_NAME
private java.lang.reflect.Method removeHandlerMethod
private static final java.lang.String GET_ALL_HANDLER_METHOD_NAME
private java.lang.reflect.Method getHandlersMethod
private static final java.lang.String SET_JAVA_DELEGATION_MODEL_METHOD_NAME
private java.lang.reflect.Method javaDelegationModelMethod
Constructor Detail |
---|
public JettyDeployer() 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 static java.lang.ClassLoader getClassLoader()
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.public static void setContextEvent(javax.servlet.ServletContextEvent contextEvent) throws EZBDeployerException
contextEvent
- the given object.
EZBDeployerException
- if the jetty server object is not found from the given context event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |