Class EbeanServerFactory
- java.lang.Object
-
- io.ebean.EbeanServerFactory
-
@Deprecated public class EbeanServerFactory extends Object
Deprecated.Deprecated - please migrate to DatabaseFactory.Creates EbeanServer instances.
This uses either a ServerConfig or properties in the ebean.properties file to configure and create a EbeanServer instance.
The EbeanServer instance can either be registered with the Ebean singleton or not. The Ebean singleton effectively holds a map of EbeanServers by a name. If the EbeanServer is registered with the Ebean singleton you can retrieve it later via
Ebean.getServer(String)
.One EbeanServer can be nominated as the 'default/primary' EbeanServer. Many methods on the Ebean singleton such as
Ebean.find(Class)
are just a convenient way of using the 'default/primary' EbeanServer.
-
-
Constructor Summary
Constructors Constructor Description EbeanServerFactory()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EbeanServer
create(ServerConfig config)
Deprecated.Create using the ServerConfig object to configure the database.static EbeanServer
create(String name)
Deprecated.Create using ebean.properties to configure the database.static EbeanServer
createWithContextClassLoader(ServerConfig config, ClassLoader classLoader)
Deprecated.Create using the ServerConfig additionally specifying a classLoader to use as the context class loader.static void
initialiseContainer(ContainerConfig containerConfig)
Deprecated.Initialise the container with clustering configuration.static void
shutdown()
Deprecated.Shutdown gracefully all EbeanServers cleaning up any resources as required.
-
-
-
Constructor Detail
-
EbeanServerFactory
public EbeanServerFactory()
Deprecated.
-
-
Method Detail
-
initialiseContainer
public static void initialiseContainer(ContainerConfig containerConfig)
Deprecated.Initialise the container with clustering configuration.Call this prior to creating any EbeanServer instances or alternatively set the ContainerConfig on the ServerConfig when creating the first EbeanServer instance.
-
create
public static EbeanServer create(String name)
Deprecated.Create using ebean.properties to configure the database.
-
create
public static EbeanServer create(ServerConfig config)
Deprecated.Create using the ServerConfig object to configure the database.
-
createWithContextClassLoader
public static EbeanServer createWithContextClassLoader(ServerConfig config, ClassLoader classLoader)
Deprecated.Create using the ServerConfig additionally specifying a classLoader to use as the context class loader.
-
shutdown
public static void shutdown()
Deprecated.Shutdown gracefully all EbeanServers cleaning up any resources as required.This is typically invoked via JVM shutdown hook and not explicitly called.
-
-