Hi,
although I do not have a working example of using Firebird with the Hibernate-provided connection pool, I will post my config for using Hibernate with a tomcat-dbcp connection pool. Hope this is useful for you.
hibernate.cfg.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.datasource">java:/comp/env/jdbc/myDb</property>
<property name="dialect">org.hibernate.dialect.FirebirdDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">none</property>
<mapping class="lu.mind.Customer" />
<mapping class="lu.mind. ..." />
</session-factory>
</hibernate-configuration>
context.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Context debug="99">
<Resource name="jdbc/myDb"
auth="Container"
url="jdbc:firebirdsql:localhost/3051:myAlias?encoding=ISO8859_1"
username="SYSDBA"
password="masterkey"
type="javax.sql.DataSource"
driverClassName="org.firebirdsql.jdbc.FBDriver"
validationQuery="select 1 from RDB$DATABASE"
removeAbandoned="true"
removeAbandonedTimeout="300"
logAbandoned="true"
initialSize="5"
maxActive="50"
maxIdle="10"
minIdle="5"
maxWait="5000"
testOnBorrow="false"
testWhileIdle="false"
timeBetweenEvictionRunsMillis="40000"
minEvictableIdleTimeMillis="240000"
debug="99"
/>
</Context>