01: package org.vraptor.plugin.jpa;
02:
03: import javax.persistence.EntityManager;
04: import javax.persistence.PersistenceContext;
05:
06: import org.vraptor.annotations.Component;
07:
08: /**
09: * @author Fabio Correia Kung
10: *
11: */
12: @Component
13: public class CustomUnitName {
14: @PersistenceContext(unitName="otherName")
15: private EntityManager entityManager;
16:
17: public void logic() {
18: }
19:
20: public EntityManager getEntityManager() {
21: return this.entityManager;
22: }
23: }
|