org.nuiton.topia.framework
Class TopiaConnectionProvider

java.lang.Object
  extended by org.nuiton.topia.framework.TopiaConnectionProvider
All Implemented Interfaces:
org.hibernate.connection.ConnectionProvider

public class TopiaConnectionProvider
extends Object
implements org.hibernate.connection.ConnectionProvider

Customized connection provider.

This provider fix the following bug : http://nuiton.org/issues/show/561

To use this connection provider, add this property to topia configuration

 config.setProperty(Environment.CONNECTION_PROVIDER, TopiaConnectionProvider.class.getName());
 

or in a properties file :

 hibernate.connection.provider_class=org.nuiton.topia.framework.TopiaConnectionProvider
 

Since:
2.5.3
Author:
tchemit

Constructor Summary
TopiaConnectionProvider()
           
 
Method Summary
 void close()
           
 void closeConnection(Connection conn)
           
 void configure(Properties props)
           
protected  void finalize()
           
 Connection getConnection()
           
 Properties getConnectionProps()
           
 Integer getIsolation()
           
 List<Connection> getPool()
           
 int getPoolSize()
           
 String getUrl()
           
 boolean isAutocommit()
           
 boolean supportsAggressiveRelease()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopiaConnectionProvider

public TopiaConnectionProvider()
Method Detail

configure

public void configure(Properties props)
               throws org.hibernate.HibernateException
Specified by:
configure in interface org.hibernate.connection.ConnectionProvider
Throws:
org.hibernate.HibernateException

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface org.hibernate.connection.ConnectionProvider
Throws:
SQLException

closeConnection

public void closeConnection(Connection conn)
                     throws SQLException
Specified by:
closeConnection in interface org.hibernate.connection.ConnectionProvider
Throws:
SQLException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

close

public void close()
Specified by:
close in interface org.hibernate.connection.ConnectionProvider

supportsAggressiveRelease

public boolean supportsAggressiveRelease()
Specified by:
supportsAggressiveRelease in interface org.hibernate.connection.ConnectionProvider

getUrl

public String getUrl()

getConnectionProps

public Properties getConnectionProps()

getIsolation

public Integer getIsolation()

getPool

public List<Connection> getPool()

getPoolSize

public int getPoolSize()

isAutocommit

public boolean isAutocommit()


Copyright © 2004-2011 CodeLutin. All Rights Reserved.