Package org.nuiton.topia.framework
Class TopiaConnectionProviderHardCoded
java.lang.Object
org.nuiton.topia.framework.TopiaConnectionProviderHardCoded
- All Implemented Interfaces:
java.io.Serializable,org.hibernate.engine.jdbc.connections.spi.ConnectionProvider,org.hibernate.service.Service,org.hibernate.service.spi.Configurable,org.hibernate.service.spi.Stoppable,org.hibernate.service.spi.Wrapped
public class TopiaConnectionProviderHardCoded
extends java.lang.Object
implements org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.Stoppable
Customized connection provider.
- Since:
- 2.5.3
- Author:
- tchemit <chemit@codelutin.com>
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.sql.Connection>poolOur pool of connections which are not closed and availables. -
Constructor Summary
Constructors Constructor Description TopiaConnectionProviderHardCoded() -
Method Summary
Modifier and Type Method Description voidcloseConnection(java.sql.Connection conn)voidconfigure(java.util.Map configurationValues)protected voidfinalize()java.sql.ConnectiongetConnection()booleanisUnwrappableAs(java.lang.Class unwrapType)voidstop()booleansupportsAggressiveRelease()<T> Tunwrap(java.lang.Class<T> unwrapType)
-
Field Details
-
pool
protected final java.util.List<java.sql.Connection> poolOur pool of connections which are not closed and availables.
-
-
Constructor Details
-
TopiaConnectionProviderHardCoded
public TopiaConnectionProviderHardCoded()
-
-
Method Details
-
configure
public void configure(java.util.Map configurationValues) throws org.hibernate.HibernateException- Specified by:
configurein interfaceorg.hibernate.service.spi.Configurable- Throws:
org.hibernate.HibernateException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
getConnectionin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider- Throws:
java.sql.SQLException
-
closeConnection
public void closeConnection(java.sql.Connection conn) throws java.sql.SQLException- Specified by:
closeConnectionin interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider- Throws:
java.sql.SQLException
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
stop
public void stop()- Specified by:
stopin interfaceorg.hibernate.service.spi.Stoppable
-
supportsAggressiveRelease
public boolean supportsAggressiveRelease()- Specified by:
supportsAggressiveReleasein interfaceorg.hibernate.engine.jdbc.connections.spi.ConnectionProvider
-
isUnwrappableAs
public boolean isUnwrappableAs(java.lang.Class unwrapType)- Specified by:
isUnwrappableAsin interfaceorg.hibernate.service.spi.Wrapped
-
unwrap
public <T> T unwrap(java.lang.Class<T> unwrapType)- Specified by:
unwrapin interfaceorg.hibernate.service.spi.Wrapped
-