br.com.caelum.vraptor.util.jpa
Class EntityManagerFactoryCreator

java.lang.Object
  extended by br.com.caelum.vraptor.util.jpa.EntityManagerFactoryCreator
All Implemented Interfaces:
br.com.caelum.vraptor.ioc.ComponentFactory<javax.persistence.EntityManagerFactory>

@Component
@ApplicationScoped
public class EntityManagerFactoryCreator
extends Object
implements br.com.caelum.vraptor.ioc.ComponentFactory<javax.persistence.EntityManagerFactory>

An example of how to create EntityManagerFactory's for your components

Author:
Lucas Cavalcanti

Constructor Summary
EntityManagerFactoryCreator()
           
 
Method Summary
 void create()
           
 void destroy()
           
protected  javax.persistence.EntityManagerFactory getEntityManagerFactory()
           
 javax.persistence.EntityManagerFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityManagerFactoryCreator

public EntityManagerFactoryCreator()
Method Detail

create

@PostConstruct
public void create()

getInstance

public javax.persistence.EntityManagerFactory getInstance()
Specified by:
getInstance in interface br.com.caelum.vraptor.ioc.ComponentFactory<javax.persistence.EntityManagerFactory>

destroy

@PreDestroy
public void destroy()

getEntityManagerFactory

protected javax.persistence.EntityManagerFactory getEntityManagerFactory()


Copyright © 2013 Caelum. All Rights Reserved.