Class JavaEEDeployer<T extends Container,U extends ApplicationContainer>
- java.lang.Object
-
- org.glassfish.javaee.core.deployment.JavaEEDeployer<T,U>
-
- All Implemented Interfaces:
Deployer<T,U>
- Direct Known Subclasses:
AppClientDeployer
,ConnectorDeployer
,EjbDeployer
,ResourcesDeployer
,WebDeployer
,WebServicesDeployer
public abstract class JavaEEDeployer<T extends Container,U extends ApplicationContainer> extends Object implements Deployer<T,U>
Convenient superclass for JavaEE Deployer implementations.
-
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationRegistry
appRegistry
protected ServerEnvironment
env
protected org.glassfish.hk2.api.ServiceLocator
habitat
protected ApplicationVisitor
undeploymentVisitor
-
Constructor Summary
Constructors Constructor Description JavaEEDeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean(DeploymentContext context)
Clean any files and artifacts that were created during the execution of the prepare method.protected void
generateArtifacts(DeploymentContext dc)
protected Application
getApplicationFromApplicationInfo(String appName)
protected String
getCommonClassPath()
MetaData
getMetaData()
Returns the meta data assocated with this Deployerprotected String
getModuleClassPath(DeploymentContext ctx)
Returns the classpath associated with this module Can be used to compile generated cmp classes, rmi stubs etc.protected String
getObjectType(DeploymentContext context)
U
load(T container, DeploymentContext context)
Loads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.<V> V
loadMetaData(Class<V> type, DeploymentContext dc)
Loads the meta date associated with the application.boolean
prepare(DeploymentContext dc)
Prepares the application bits for running in the application server.
-
-
-
Field Detail
-
env
@Inject protected ServerEnvironment env
-
appRegistry
@Inject protected ApplicationRegistry appRegistry
-
habitat
@Inject protected org.glassfish.hk2.api.ServiceLocator habitat
-
undeploymentVisitor
@Inject @Named("application_undeploy") @Optional protected ApplicationVisitor undeploymentVisitor
-
-
Method Detail
-
getMetaData
public MetaData getMetaData()
Returns the meta data assocated with this Deployer- Specified by:
getMetaData
in interfaceDeployer<T extends Container,U extends ApplicationContainer>
- Returns:
- the meta data for this Deployer
-
getModuleClassPath
protected String getModuleClassPath(DeploymentContext ctx)
Returns the classpath associated with this module Can be used to compile generated cmp classes, rmi stubs etc.- Returns:
- the classpath for this module
-
getCommonClassPath
protected String getCommonClassPath()
-
loadMetaData
public <V> V loadMetaData(Class<V> type, DeploymentContext dc)
Loads the meta date associated with the application.- Specified by:
loadMetaData
in interfaceDeployer<T extends Container,U extends ApplicationContainer>
- Parameters:
type
- type of metadata that this deployer has declared providing.dc
- deployment context- Returns:
- the meta-data of type V
-
prepare
public boolean prepare(DeploymentContext dc)
Prepares the application bits for running in the application server. For certain cases, this is generating non portable artifacts and other application specific tasks. Failure to prepare should throw an exception which will cause the overall deployment to fail.
-
load
public U load(T container, DeploymentContext context)
Loads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.
-
generateArtifacts
protected void generateArtifacts(DeploymentContext dc) throws DeploymentException
- Throws:
DeploymentException
-
clean
public void clean(DeploymentContext context)
Clean any files and artifacts that were created during the execution of the prepare method.
-
getObjectType
protected String getObjectType(DeploymentContext context)
-
getApplicationFromApplicationInfo
protected Application getApplicationFromApplicationInfo(String appName)
-
-