Package org.glassfish.persistence.jpa
Class JPADeployer
- java.lang.Object
-
- org.glassfish.deployment.common.SimpleDeployer<JPAContainer,JPApplicationContainer>
-
- org.glassfish.persistence.jpa.JPADeployer
-
- All Implemented Interfaces:
Deployer<JPAContainer,JPApplicationContainer>,EventListener,org.glassfish.hk2.api.PostConstruct
@Service public class JPADeployer extends SimpleDeployer<JPAContainer,JPApplicationContainer> implements org.glassfish.hk2.api.PostConstruct, EventListener
Deployer for JPA applications- Author:
- Mitesh Meswani
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Constructor Summary
Constructors Constructor Description JPADeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanArtifacts(DeploymentContext dc)voidevent(EventListener.Event event)Process a Glassfish/Payara eventprotected voidgenerateArtifacts(DeploymentContext dc)MetaDatagetMetaData()Returns the meta data assocated with this DeployerJPApplicationContainerload(JPAContainer container, DeploymentContext context)No-op<V> VloadMetaData(Class<V> type, DeploymentContext context)Loads the meta date associated with the application.voidpostConstruct()booleanprepare(DeploymentContext context)EMFs for refered pus are created and stored in JPAApplication instance.-
Methods inherited from class org.glassfish.deployment.common.SimpleDeployer
clean, unload
-
-
-
-
Method Detail
-
getMetaData
public MetaData getMetaData()
Description copied from class:SimpleDeployerReturns the meta data assocated with this Deployer- Specified by:
getMetaDatain interfaceDeployer<JPAContainer,JPApplicationContainer>- Overrides:
getMetaDatain classSimpleDeployer<JPAContainer,JPApplicationContainer>- Returns:
- the meta data for this Deployer
-
generateArtifacts
protected void generateArtifacts(DeploymentContext dc) throws DeploymentException
- Specified by:
generateArtifactsin classSimpleDeployer<JPAContainer,JPApplicationContainer>- Throws:
DeploymentException
-
cleanArtifacts
protected void cleanArtifacts(DeploymentContext dc) throws DeploymentException
- Specified by:
cleanArtifactsin classSimpleDeployer<JPAContainer,JPApplicationContainer>- Throws:
DeploymentException
-
loadMetaData
public <V> V loadMetaData(Class<V> type, DeploymentContext context)
Description copied from class:SimpleDeployerLoads the meta date associated with the application.- Specified by:
loadMetaDatain interfaceDeployer<JPAContainer,JPApplicationContainer>- Overrides:
loadMetaDatain classSimpleDeployer<JPAContainer,JPApplicationContainer>- Parameters:
type- type of meta-data that this deployer has declared providing.- Returns:
- the meta-data of type V
-
prepare
public boolean prepare(DeploymentContext context)
EMFs for refered pus are created and stored in JPAApplication instance. The JPAApplication instance is stored in given DeploymentContext to be retrieved by load- Specified by:
preparein interfaceDeployer<JPAContainer,JPApplicationContainer>- Overrides:
preparein classSimpleDeployer<JPAContainer,JPApplicationContainer>- Parameters:
context- deployment context- Returns:
- true if the prepare phase was successful
-
load
public JPApplicationContainer load(JPAContainer container, DeploymentContext context)
Description copied from class:SimpleDeployerNo-op- Specified by:
loadin interfaceDeployer<JPAContainer,JPApplicationContainer>- Overrides:
loadin classSimpleDeployer<JPAContainer,JPApplicationContainer>- Parameters:
container- in which the application will residecontext- of the deployment- Returns:
- an ApplicationContainer instance identifying the running application
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
event
public void event(EventListener.Event event)
Description copied from interface:EventListenerProcess a Glassfish/Payara event- Specified by:
eventin interfaceEventListener
-
-