| java.lang.Object org.nemesis.forum.util.jdbc.DbConnectionProvider
All known Subclasses: org.nemesis.forum.util.jdbc.NoPool, org.nemesis.forum.util.jdbc.DataSourceConnectionProvider, org.nemesis.forum.util.jdbc.DbConnectionDefaultPool,
DbConnectionProvider | abstract public class DbConnectionProvider (Code) | | Abstract class that defines the connection provider framework. Other classes
extend this abstract class to make connection to actual data sources.
|
Method Summary | |
abstract protected void | destroy() Tells the connection provider to destroy itself. | abstract public Connection | getConnection() Returns a database connection. | public boolean | isPooled() Returns true if this connection provider provides connections out
of a connection pool. | abstract protected void | restart() This method should be called whenever properties have been changed so
that the changes will take effect. | abstract protected void | start() Starts the connection provider. |
destroy | abstract protected void destroy()(Code) | | Tells the connection provider to destroy itself. For many connection
providers, this will essentially result in a no-op. However,
connection provider users should always call this method when changing
from one connection provider to another to ensure that there are no
dangling database connections.
|
getConnection | abstract public Connection getConnection()(Code) | | Returns a database connection. When a Yazd component is done with a
connection, it will call the close method of that connection. Therefore,
connection pools with special release methods are not directly
supported by the connection provider infrastructure. Instead, connections
from those pools should be wrapped such that calling the close method
on the wrapper class will release the connection from the pool.
a Connection object. |
isPooled | public boolean isPooled()(Code) | | Returns true if this connection provider provides connections out
of a connection pool. Implementing and using connection providers that
are pooled is strongly recommended, as they greatly increase the speed
of Yazd.
true if the Connection objects returned by this provider arepooled. |
restart | abstract protected void restart()(Code) | | This method should be called whenever properties have been changed so
that the changes will take effect.
|
start | abstract protected void start()(Code) | | Starts the connection provider. For some connection providers, this
will be a no-op. However, connection provider users should always call
this method to make sure the connection provider is started.
|
|
|