br.com.caelum.vraptor.util.jpa
Class EntityManagerFactoryCreator
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityManagerFactoryCreator
public EntityManagerFactoryCreator()
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.