Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceFactory

        public ServiceFactory()
    • 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. A META-INF/persistence.xml must be available with the same unit name in the classpath.