org.unitils.orm.jpa.annotation
Annotation Type JpaEntityManagerFactory


@Target(value={TYPE,METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface JpaEntityManagerFactory

This annotation can be used in three different ways:

The configured EntityManagerFactory will connect to the unitils configured test datasource, and will join in unitils test-bound transactions.

Author:
Filip Neven, Tim Ducheyne

Optional Element Summary
 String configFile
          The persistence xml file that has to be loaded for configuring the EntityManagerFactory.
 String persistenceUnit
          The name of the persistence unit, as defined in the persistence config file
 

persistenceUnit

public abstract String persistenceUnit
The name of the persistence unit, as defined in the persistence config file

Default:
""

configFile

public abstract String configFile
The persistence xml file that has to be loaded for configuring the EntityManagerFactory. If omitted, the default META-INF/persistence.xml file is loaded.

Default:
""


Copyright © 2011. All Rights Reserved.