I use hibernate3.2+proxool0.9.0RC2 to build desktop application
1. build SessionFactory successfully
2. create Proxool connection pool successfully
3. sessionFactory.openSession in LocalThread successfully
4. session.beginTransaction successfully
5. create Criteria and add Restrictions successfully
6. BUT when I call: criteria.list() sometimes I can get the object out of database, sometimes I got exception, it is funny that the Exception is not always the same, it can be Network IO exception, can be ora-01031 insufficient privilege, can be table or view can not be found
I tried it on SQLServer2000/2005, and the result was almost the same.
who can tell me what is wrong with my configuration? Thank you very much.
hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<property name="hibernate.default_schema">user1</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="hibernate.cache.provider_class">
org.hibernate.cache.EhCacheProvider
</property>
<property name="hibernate.proxool.pool_alias">TEST2006</property>
<property name="hibernate.proxool.xml">proxool.cfg.xml</property>
<property name="hibernate.connection.provider_class">
org.hibernate.connection.ProxoolConnectionProvider
</property>
<mapping resource="com/etm/bean/xml/testtable.hbm.xml"/>
</session-factory>
</hibernate-configuration>
proxool.cfg.xml:
<proxool>
<alias>TEST2006</alias>
<driver-url>jdbc:oracle:thin:@server:1521:ora10gde</driver-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<driver-properties>
<property name="user" value="user1"/>
<property name="password" value="user1"/>
</driver-properties>
<maximum-active-time>3600000</maximum-active-time>
<maximum-connection-count>100</maximum-connection-count>
<maximum-connection-lifetime>18000000</maximum-connection-lifetime>
<house-keeping-test-sql>select CURRENT_TIMESTAMP from dual</house-keeping-test-sql>
<statistics>1m,15m,1d</statistics>
<trace>true</trace>
</proxool>
|