ninja.ebean
Class NinjaEbeanServerLifecycle

java.lang.Object
  extended by 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
NinjaEbeanServerLifecycle(org.slf4j.Logger logger, ninja.utils.NinjaProperties ninjaProperties)
           
 
Method Summary
 com.avaje.ebean.EbeanServer getEbeanServer()
           
 void startServer()
          This method reads the configuration properties from your application.conf file and configures Ebean accordingly.
 void stopServer()
          This method shuts down Ebean and all connections in a nice way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NinjaEbeanServerLifecycle

@Inject
public NinjaEbeanServerLifecycle(org.slf4j.Logger logger,
                                        ninja.utils.NinjaProperties ninjaProperties)
Method Detail

startServer

public void startServer()
This method reads the configuration properties from your application.conf file and configures Ebean accordingly.


stopServer

public void stopServer()
This method shuts down Ebean and all connections in a nice way.


getEbeanServer

public com.avaje.ebean.EbeanServer getEbeanServer()


Copyright © 2012. All Rights Reserved.