Package ninja.ebean
Class NinjaEbeanServerLifecycle
- java.lang.Object
-
- ninja.ebean.NinjaEbeanServerLifecycle
-
public class NinjaEbeanServerLifecycle extends Object
This is an internal class of Ninja Ebeans support. It is responsible for creating db connections and shutting them down upon server start / stop. As end-user you should NOT use this method directly. Instead simply inject EbeanServer into the class you want to use. The interface EbeanServer is configured by this class and provided by a provider.
-
-
Constructor Summary
Constructors Constructor Description NinjaEbeanServerLifecycle(org.slf4j.Logger logger, ninja.utils.NinjaProperties ninjaProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.ebean.EbeanServercreateEbeanServer(io.ebean.config.ServerConfig serverConfig)Creates the Ebean server with the prepared server config.io.ebean.EbeanServergetEbeanServer()voidstartServer()This method reads the configuration properties from your application.conf file and configures Ebean accordingly.
-
-
-
Method Detail
-
startServer
public final void startServer()
This method reads the configuration properties from your application.conf file and configures Ebean accordingly.
-
createEbeanServer
public io.ebean.EbeanServer createEbeanServer(io.ebean.config.ServerConfig serverConfig)
Creates the Ebean server with the prepared server config. Provides a last chance to modify the config in a subclass if you'd like to customize the config further.- Parameters:
serverConfig- The prepared server config- Returns:
- The newly created Ebean server
-
getEbeanServer
public io.ebean.EbeanServer getEbeanServer()
-
-