|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.deployer.AbsDeployer
public abstract class AbsDeployer
Abstract class that defines common methods for deployer.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_FOLDER
Folder to create in tmp folder. |
private EZBServer |
embedded
Embedded server linked to this deployer. |
private static JLog |
logger
Logger. |
Constructor Summary | |
---|---|
AbsDeployer()
|
Method Summary | |
---|---|
protected void |
deployEJB(EJBDeployable ejbDeployable)
Deploy an EJB (called by the deploy method). |
protected java.lang.ClassLoader |
getClassLoaderForEAR(EARDeployable earDeployable)
Build and return a classloader for the given EAR. |
EZBServer |
getEmbedded()
|
protected static java.lang.reflect.Method |
getMethod(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class... parameters)
Get the method on the given class with the given method name and the given parameters. |
protected PersistenceUnitManager |
getPersistenceUnitManager(EARDeployable earDeployable,
java.lang.ClassLoader appClassLoader)
Gets the persistence unit manager for the given EAR and classloader. |
protected static java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object object,
java.lang.Object... args)
Invoke the given method on the given object (null for static method) and with the given args. |
protected static java.lang.Class |
loadClass(java.lang.String className)
Load the given class with its given classname. |
protected static java.lang.Class |
loadClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Load the given class with its given classname. |
protected static java.lang.Object |
newInstance(java.lang.Class clazz)
Build an instance of the given class. |
protected static java.lang.Object |
newInstance(java.lang.reflect.Constructor constructor,
java.lang.Object... parameters)
Build an instance by using the given constructor and given parameters. |
void |
setEmbedded(EZBServer embedded)
Receive Embedded instance for this deployer. |
protected void |
undeployEJB3FromEAR(EARDeployable earDeployable)
Undeploy EJB3s of an EAR (called by the undeploy method). |
protected EARDeployable |
unpackEARDeployable(EARDeployable earDeployable)
Unpack the given archive in a temp folder, then build a local EARDeployable and fill it with submodules and then return it. |
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 |
---|
deploy, undeploy |
Field Detail |
---|
public static final java.lang.String DEFAULT_FOLDER
private static JLog logger
private EZBServer embedded
Constructor Detail |
---|
public AbsDeployer()
Method Detail |
---|
public EZBServer getEmbedded()
public void setEmbedded(EZBServer embedded)
setEmbedded
in interface EZBDeployer
embedded
- the given instance of the embedded server.protected java.lang.ClassLoader getClassLoaderForEAR(EARDeployable earDeployable) throws EZBDeployerException
earDeployable
- the given EAR
EZBDeployerException
- if the classloader cannot be builtprotected PersistenceUnitManager getPersistenceUnitManager(EARDeployable earDeployable, java.lang.ClassLoader appClassLoader)
earDeployable
- the ear deployableappClassLoader
- the classloader used as deployable
protected void deployEJB(EJBDeployable ejbDeployable) throws EZBDeployerException
ejbDeployable
- a given EJB deployable
EZBDeployerException
- if the deployment is not done.protected static java.lang.Object newInstance(java.lang.Class clazz) throws EZBDeployerException
clazz
- the class to instantiate
EZBDeployerException
- if the class can't be loadedprotected static java.lang.Object newInstance(java.lang.reflect.Constructor constructor, java.lang.Object... parameters) throws EZBDeployerException
constructor
- the constructor to useparameters
- the parameters of the given constructor
EZBDeployerException
- if the class can't be loadedprotected static java.lang.Class loadClass(java.lang.String className) throws EZBDeployerException
className
- the name of the class to load
EZBDeployerException
- if the class can't be loadedprotected static java.lang.Class loadClass(java.lang.String className, java.lang.ClassLoader classLoader) throws EZBDeployerException
className
- the name of the class to loadclassLoader
- the given classloader (or null to use thread context classloader)
EZBDeployerException
- if the class can't be loadedprotected static java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object object, java.lang.Object... args) throws EZBDeployerException
method
- the method to invokeobject
- the object on which the method is invokedargs
- the arguments of the method
EZBDeployerException
- if the method is not invokedprotected static java.lang.reflect.Method getMethod(java.lang.Class clazz, java.lang.String methodName, java.lang.Class... parameters) throws EZBDeployerException
clazz
- the class on which search the methodmethodName
- the name of the method to searchparameters
- the class parameters of the method that is searched
EZBDeployerException
- if the method is not foundprotected void undeployEJB3FromEAR(EARDeployable earDeployable) throws EZBDeployerException
earDeployable
- a given EAR deployable
EZBDeployerException
- if the deployment is not done.protected EARDeployable unpackEARDeployable(EARDeployable earDeployable) throws EZBDeployerException
earDeployable
- the archive to unpack.
EZBDeployerException
- if the EAR can't be unpacked
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |