@Singleton public class DefaultConnectionPool extends Object implements ConnectionPool
Constructor and Description |
---|
DefaultConnectionPool(play.api.db.ConnectionPool connectionPool) |
Modifier and Type | Method and Description |
---|---|
play.api.db.ConnectionPool |
asScala() |
void |
close(DataSource dataSource)
Close the given data source.
|
DataSource |
create(String name,
com.typesafe.config.Config config,
Environment environment)
Create a data source with the given configuration.
|
@Inject public DefaultConnectionPool(play.api.db.ConnectionPool connectionPool)
public DataSource create(String name, com.typesafe.config.Config config, Environment environment)
ConnectionPool
create
in interface ConnectionPool
name
- the database nameconfig
- the data source configurationenvironment
- the database environmentpublic void close(DataSource dataSource)
ConnectionPool
close
in interface ConnectionPool
dataSource
- the data source to closepublic play.api.db.ConnectionPool asScala()
asScala
in interface ConnectionPool