org.glassfish.persistence.jpa
Class JPADeployer

java.lang.Object
  extended by org.glassfish.deployment.common.SimpleDeployer<JPAContainer,JPApplicationContainer>
      extended by org.glassfish.persistence.jpa.JPADeployer
All Implemented Interfaces:
Deployer<JPAContainer,JPApplicationContainer>, EventListener, org.jvnet.hk2.component.PostConstruct

@Service
public class JPADeployer
extends SimpleDeployer<JPAContainer,JPApplicationContainer>
implements org.jvnet.hk2.component.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
JPADeployer()
           
 
Method Summary
protected  void cleanArtifacts(DeploymentContext dc)
           
 void event(EventListener.Event event)
           
protected  void generateArtifacts(DeploymentContext dc)
           
 MetaData getMetaData()
           
 JPApplicationContainer load(JPAContainer container, DeploymentContext context)
           
<V> V
loadMetaData(java.lang.Class<V> type, DeploymentContext context)
           
 void postConstruct()
           
 boolean prepare(DeploymentContext context)
          EMFs for refered pus are created and stored in JPAApplication instance.
 
Methods inherited from class org.glassfish.deployment.common.SimpleDeployer
clean, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPADeployer

public JPADeployer()
Method Detail

getMetaData

public MetaData getMetaData()
Specified by:
getMetaData in interface Deployer<JPAContainer,JPApplicationContainer>
Overrides:
getMetaData in class SimpleDeployer<JPAContainer,JPApplicationContainer>

generateArtifacts

protected void generateArtifacts(DeploymentContext dc)
                          throws DeploymentException
Specified by:
generateArtifacts in class SimpleDeployer<JPAContainer,JPApplicationContainer>
Throws:
DeploymentException

cleanArtifacts

protected void cleanArtifacts(DeploymentContext dc)
                       throws DeploymentException
Specified by:
cleanArtifacts in class SimpleDeployer<JPAContainer,JPApplicationContainer>
Throws:
DeploymentException

loadMetaData

public <V> V loadMetaData(java.lang.Class<V> type,
                          DeploymentContext context)
Specified by:
loadMetaData in interface Deployer<JPAContainer,JPApplicationContainer>
Overrides:
loadMetaData in class SimpleDeployer<JPAContainer,JPApplicationContainer>

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:
prepare in interface Deployer<JPAContainer,JPApplicationContainer>
Overrides:
prepare in class SimpleDeployer<JPAContainer,JPApplicationContainer>

load

public JPApplicationContainer load(JPAContainer container,
                                   DeploymentContext context)
Specified by:
load in interface Deployer<JPAContainer,JPApplicationContainer>
Overrides:
load in class SimpleDeployer<JPAContainer,JPApplicationContainer>

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct

event

public void event(EventListener.Event event)
Specified by:
event in interface EventListener


Copyright © 2012 GlassFish Community. All Rights Reserved.