|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ogf.graap.wsag.server.persistence.EmfRegistry
public class EmfRegistry
Field Summary | |
---|---|
static String |
PERSISTENCE_MODE_FILE
Persistence mode file This mode starts wsag4j with an file database. |
static String |
PERSISTENCE_MODE_FILE_PU_NAME
Persistence unit name for file mode (see wsag4j-server-resources /META-INF/persistence.xml) |
static String |
PERSISTENCE_MODE_MEM
Persistence mode memory This mode starts wsag4j with an in-memory database. |
static String |
PERSISTENCE_MODE_MEM_PU_NAME
Persistence unit name for memory mode (see wsag4j-server-resources /META-INF/persistence.xml) |
static String |
PERSISTENCE_MODE_MEM_SERVER
Persistence mode memory for server tests This mode starts wsag4j with an in-memory database. |
static String |
PERSISTENCE_MODE_MEM_SERVER_PU_NAME
Persistence unit name for memory mode for server tests (see wsag4j-server-resources /META-INF/persistence.xml) |
static String |
WSAG4J_DATAPATH
System property to set the WSAG4J database location. |
static String |
WSAG4J_DATAPATH_DEFAULT
Default location of the wsag4j hsql database. |
Constructor Summary | |
---|---|
EmfRegistry()
|
Method Summary | |
---|---|
static void |
finalizeEmfRegistry()
Closes the entity manager factory and all entity managers. |
static javax.persistence.EntityManager |
getEntityManager()
Creates a new entity manager. |
static String |
printInfo()
Returns the operation mode info message. |
static void |
setPersistenceMode(String persistenceMode)
Sets the persistence mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WSAG4J_DATAPATH
public static final String WSAG4J_DATAPATH_DEFAULT
public static final String PERSISTENCE_MODE_MEM
This mode starts wsag4j with an in-memory database. It supports persistence for the wsag4j-server and wsag4j-webservice modules. Since an in-memory db is used agreements will not be stored on disk. After restarting the wsag4j engine all agreements disappear. This mode is usually used for unit testing.
public static final String PERSISTENCE_MODE_MEM_PU_NAME
public static final String PERSISTENCE_MODE_MEM_SERVER
This mode starts wsag4j with an in-memory database. It supports persistence for the wsag4j-server module only. Since an in-memory db is used agreements will not be stored on disk. After restarting the wsag4j engine all agreements disappear. This mode is usually used for unit testing.
public static final String PERSISTENCE_MODE_MEM_SERVER_PU_NAME
public static final String PERSISTENCE_MODE_FILE
This mode starts wsag4j with an file database. It supports persistence for the wsag4j-server and wsag4j-webservice modules. Since an file db is used agreements will be stored on disk. After restarting the wsag4j engine all agreements are reloaded. This mode is usually used for productive mode.
Important: Make sure that the org.wsag4j.persistence.datapath
system property is
set to the correct location of the hsqldb database directory. Otherwise the database will be stored in
{java.io.tmpdir}/wsag-data
public static final String PERSISTENCE_MODE_FILE_PU_NAME
Constructor Detail |
---|
public EmfRegistry()
Method Detail |
---|
public static void setPersistenceMode(String persistenceMode)
persistenceMode
- the persistence mode to setpublic static javax.persistence.EntityManager getEntityManager()
public static String printInfo()
public static void finalizeEmfRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |