Package play.db
Class DBPlugin
- java.lang.Object
-
- play.PlayPlugin
-
- play.db.DBPlugin
-
- All Implemented Interfaces:
java.lang.Comparable<PlayPlugin>
public class DBPlugin extends PlayPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDBPlugin.ProxyDriverNeeded because DriverManager will not load a driver ouside of the system classloader-
Nested classes/interfaces inherited from class play.PlayPlugin
PlayPlugin.Filter<T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Stringurl-
Fields inherited from class play.PlayPlugin
index
-
-
Constructor Summary
Constructors Constructor Description DBPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataSourceFactoryfactory(Configuration dbConfig)voidinvocationFinally()Called at the end of the invocation.voidonApplicationStart()Called at application start (and at each reloading) Time to start stateful things.voidonApplicationStop()Called at application stop (and before each reloading) Time to shutdown stateful things.protected java.lang.StringtestDataSource(javax.sql.DataSource ds)-
Methods inherited from class play.PlayPlugin
addMimeTypes, addTemplateExtensions, afterActionInvocation, afterApplicationStart, afterFixtureLoad, afterInvocation, beforeActionInvocation, beforeDetectingChanges, beforeInvocation, bind, bind, bind, bindBean, compareTo, compileAll, compileSources, detectChange, detectClassesChange, enhance, getFilter, getFunctionalTests, getJsonStatus, getMessage, getStatus, getUnitTests, hasFilter, loadTemplate, modelFactory, onActionInvocationFinally, onActionInvocationResult, onApplicationReady, onClassesChange, onConfigurationRead, onEvent, onInvocationException, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, rawInvocation, routeRequest, runTest, serveStatic, unBind, willBeValidated
-
-
-
-
Method Detail
-
factory
protected DataSourceFactory factory(Configuration dbConfig)
-
onApplicationStart
public void onApplicationStart()
Description copied from class:PlayPluginCalled at application start (and at each reloading) Time to start stateful things.- Overrides:
onApplicationStartin classPlayPlugin
-
testDataSource
protected java.lang.String testDataSource(javax.sql.DataSource ds) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
onApplicationStop
public void onApplicationStop()
Description copied from class:PlayPluginCalled at application stop (and before each reloading) Time to shutdown stateful things.- Overrides:
onApplicationStopin classPlayPlugin
-
invocationFinally
public void invocationFinally()
Description copied from class:PlayPluginCalled at the end of the invocation. (even if an exception occurred). Time to close request specific things.- Overrides:
invocationFinallyin classPlayPlugin
-
-