org.eiichiro.gig.persistence
Class JPAEntityManagerComponent

java.lang.Object
  extended by org.eiichiro.jaguar.Component<javax.persistence.EntityManager>
      extended by org.eiichiro.gig.persistence.JPAEntityManagerComponent

@Name(value="org.eiichiro.gig.persistence.JPAEntityManager")
@Request
public class JPAEntityManagerComponent
extends org.eiichiro.jaguar.Component<javax.persistence.EntityManager>

JPAEntityManagerComponent is a representing JPA 2.0 EntityManager for PostgreSQL-based Heroku database service.

Author:
Eiichiro Uchiumi

Constructor Summary
JPAEntityManagerComponent()
           
 
Method Summary
 void assemble()
          Lifecycle callback to assemble this instance with the EntityManager JPAEntityManagerFactoryComponent returns.
 void close()
          Lifecycle callback to close the EntityManager.
 javax.persistence.EntityManager instance()
          Returns the EntityManager this instance manages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAEntityManagerComponent

public JPAEntityManagerComponent()
Method Detail

assemble

@Activated
public void assemble()
Lifecycle callback to assemble this instance with the EntityManager JPAEntityManagerFactoryComponent returns.


close

@Passivated
public void close()
Lifecycle callback to close the EntityManager.


instance

public javax.persistence.EntityManager instance()
Returns the EntityManager this instance manages. The EntityManager may be null if the JPAEntityManagerFactoryComponent could not establish the connection to the database service.

Specified by:
instance in class org.eiichiro.jaguar.Component<javax.persistence.EntityManager>


Copyright © 2012 Eiichiro Uchiumi. All Rights Reserved.