|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) public @interface JpaUnit
A guice binding annotation you should use to tell warp-persist the name of the JPA persistence unit you wish to use. Bind a string with the name to this annotation. For instance, if the name of your persistence unit is "myDb" you would add the following in one of your guice modules:
bindConstant().annotatedWith(JpaUnit.class).to("myDb");
If you are using multiple JPA configurations in the same project (multiple modules),
bind to an instance of the JpaUnit annotation instead, specifying the module-level
binding annotation used to create the persistence module:
bindConstant().annotatedWith(JpaUnitInstance.of(MyDB.class)).to("myDb");
You must bind a string to this annotation if using JPA. And it must match a jpa unit named in your JPA persistence.xml.
Optional Element Summary | |
---|---|
Class<? extends Annotation> |
value
|
public abstract Class<? extends Annotation> value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |