Package org.glassfish.internal.data
Class EngineRef
- java.lang.Object
-
- org.glassfish.internal.data.EngineRef
-
public class EngineRef extends Object
When a module is attached to a LoadedEngine, it creates an Engine reference. Each module of an application can be loaded in several engines, however, a particular module can only be loaded once in a particular engine.- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description EngineRef(EngineInfo container, ApplicationContainer appCtr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean(ExtendedDeploymentContext context)
ApplicationConfig
getApplicationConfig()
ApplicationContainer
getApplicationContainer()
Returns the contaier associated with this applicationEngineInfo
getContainerInfo()
Returns the container associated with this applicationvoid
load(ExtendedDeploymentContext context, ProgressTracker tracker)
boolean
reload(ApplicationContext context, ProgressTracker tracker)
void
save(Engine engine)
Saves its state to the configuration.void
setApplicationConfig(ApplicationConfig config)
void
setApplicationContainer(ApplicationContainer appCtr)
Set the contaier associated with this applicationboolean
start(ApplicationContext context, ProgressTracker tracker)
boolean
stop(ApplicationContext context)
Stops a module, meaning that components implemented by this module should not be accessed by external modulesboolean
unload(ExtendedDeploymentContext context)
unloads the module from its container.
-
-
-
Constructor Detail
-
EngineRef
public EngineRef(EngineInfo container, ApplicationContainer appCtr)
-
-
Method Detail
-
getContainerInfo
public EngineInfo getContainerInfo()
Returns the container associated with this application- Returns:
- the container for this application
-
setApplicationContainer
public void setApplicationContainer(ApplicationContainer appCtr)
Set the contaier associated with this application- Parameters:
appCtr
- the container for this application
-
getApplicationContainer
public ApplicationContainer getApplicationContainer()
Returns the contaier associated with this application- Returns:
- the container for this application
-
setApplicationConfig
public void setApplicationConfig(ApplicationConfig config)
-
getApplicationConfig
public ApplicationConfig getApplicationConfig()
-
load
public void load(ExtendedDeploymentContext context, ProgressTracker tracker)
-
start
public boolean start(ApplicationContext context, ProgressTracker tracker) throws Exception
- Throws:
Exception
-
reload
public boolean reload(ApplicationContext context, ProgressTracker tracker) throws Exception
- Throws:
Exception
-
unload
public boolean unload(ExtendedDeploymentContext context)
unloads the module from its container.- Parameters:
context
- unloading context- Returns:
-
stop
public boolean stop(ApplicationContext context)
Stops a module, meaning that components implemented by this module should not be accessed by external modules- Parameters:
context
- stopping context- Returns:
-
clean
public void clean(ExtendedDeploymentContext context)
-
save
public void save(Engine engine) throws TransactionFailure, PropertyVetoException
Saves its state to the configuration. this method must be called within a transaction to the configured engine instance.- Parameters:
engine
- the engine configuration being persisted- Throws:
TransactionFailure
PropertyVetoException
-
-