@Beta public final class JdbcConnectionFactory extends Object implements RecyclingSupplier.Factory<Connection>
Constructor and Description |
---|
JdbcConnectionFactory(String driverName,
String url,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
Connection |
create()
create the object.
|
void |
dispose(Connection object)
Dispose the object.
|
boolean |
validate(Connection object,
Exception e)
Validate the object, return true if valid,
false of throw an Exception with validation detail otherwise.
|
public Connection create() throws ObjectCreationException
RecyclingSupplier.Factory
create
in interface RecyclingSupplier.Factory<Connection>
ObjectCreationException
public void dispose(Connection object) throws ObjectDisposeException
RecyclingSupplier.Factory
dispose
in interface RecyclingSupplier.Factory<Connection>
ObjectDisposeException
public boolean validate(Connection object, Exception e) throws SQLException
RecyclingSupplier.Factory
validate
in interface RecyclingSupplier.Factory<Connection>
SQLException
Copyright © 2014. All rights reserved.