Package openbook.server
Class ServiceFactory
- java.lang.Object
-
- openbook.server.ServiceFactory
-
public class ServiceFactory extends java.lang.Object
A container of persistence units. Typically a JEE container will create, manage and inject the persistence units to the user artifacts.- Author:
- Pinaki Poddar
-
-
Constructor Summary
Constructors Constructor Description ServiceFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OpenBookService
getService(java.lang.String unit)
static OpenBookService
getService(java.lang.String unit, java.util.Map<java.lang.String,java.lang.Object> config)
Creates a persistence unit of given name configured with the given name-value parameters.
-
-
-
Method Detail
-
getService
public static OpenBookService getService(java.lang.String unit)
-
getService
public static OpenBookService getService(java.lang.String unit, java.util.Map<java.lang.String,java.lang.Object> config)
Creates a persistence unit of given name configured with the given name-value parameters.- Parameters:
unit
- name of the persistence unit. AMETA-INF/persistence.xml
must be available with the same unit name in the classpath.
-
-