I have a java class that exports some data from Oracle as XML. During development, I didn't specifically use connection pooling, but added the relevant settings and files for c3p0 when deployed to production.
Without the c3p0 settings (specified below), my XML file looks like this:
Code:
<?xml version = '1.0'?>
<DATA>
<RECORD num="1">
<RECORD_ID>110</RECORD_ID>
<FILE_LIST>
<FILE_LIST_ROW num="1">
<FILE_ID>113</FILE_ID>
<ORIG_FILE_NAME>README.txt</ORIG_FILE_NAME>
<FILE_DESCRIPTION>Some misc. readme file from the filesystem</FILE_DESCRIPTION>
<PATH>attachments\E0110\README.txt</PATH>
</FILE_LIST_ROW>
<FILE_LIST_ROW num="2">
<FILE_ID>114</FILE_ID>
<ORIG_FILE_NAME>browserconfig.properties</ORIG_FILE_NAME>
<FILE_DESCRIPTION>Firefox browser config file</FILE_DESCRIPTION>
<PATH>attachments\E0110\browserconfig.properties</PATH>
</FILE_LIST_ROW>
</FILE_LIST>
</RECORD>
</DATA>
Once I added the c3p0 settings in the hibernate config file, my XML looked like this:
Code:
<?xml version = '1.0'?>
<DATA>
<RECORD num="1">
<RECORD_ID>110</RECORD_ID>
<FILE_LIST>oracle.jdbc.driver.OracleResultSetImpl@106870c</FILE_LIST>
</RECORD>
<DATA>
Anyone have any ideas why this might be?
I am using Hibernate 2.x
My hibernate.cfg.xml file:
Code:
<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.username">esub</property>
<property name="connection.url">
jdbc:oracle:thin:@DHSDEV01:1521:DHSDEVQA
</property>
<property name="dialect">
net.sf.hibernate.dialect.Oracle9Dialect
</property>
<property name="connection.password">esub</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<!-- Connection Pool Properties -->
<property name="c3p0.acquire_increment">3</property>
<property name="c3p0.idle_test_period">100</property>
<!-- seconds -->
<property name="c3p0.max_size">25</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">100</property><!-- seconds -->
<!-- mapping files removed for brevity -->
</session-factory>
</hibernate-configuration>
Snippet of code used to get the XML data:
Code:
session = HibernateSessionFactory.currentSession();
OracleXMLQuery qry = new OracleXMLQuery(session.connection(), sqlQuery);
qry.setRowsetTag("ESUBMISSION_DATA");
qry.setRowTag("ESUBMISSION_RECORD");
String xmlString = qry.getXMLString();
NOTE: sqlQuery omitted for brevity, however it DOES use a CURSOR -not sure if this is relevant as I'm a sql noob.
No exceptions generated, no errors reported. Anybody have any ideas?
Thanks in advance,
Phill