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 class
DBPlugin.ProxyDriver
Needed 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.String
url
-
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 DataSourceFactory
factory(Configuration dbConfig)
void
invocationFinally()
Called at the end of the invocation.void
onApplicationStart()
Called at application start (and at each reloading) Time to start stateful things.void
onApplicationStop()
Called at application stop (and before each reloading) Time to shutdown stateful things.protected java.lang.String
testDataSource(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:PlayPlugin
Called at application start (and at each reloading) Time to start stateful things.- Overrides:
onApplicationStart
in 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:PlayPlugin
Called at application stop (and before each reloading) Time to shutdown stateful things.- Overrides:
onApplicationStop
in classPlayPlugin
-
invocationFinally
public void invocationFinally()
Description copied from class:PlayPlugin
Called at the end of the invocation. (even if an exception occurred). Time to close request specific things.- Overrides:
invocationFinally
in classPlayPlugin
-
-