Hibernate version:3.1
Name and version of the database you are using:Oracle9i
Hi,
i'm working on a study for making a DOM cache over a relationnal database.
Database contains XML documents stored as subtrees.
Here is the main table :
Code:
CREATE TABLE XDB_ANCHORS
(
DOC_ID NUMBER(10),
ID NUMBER(10), //subtree id
PARENT_ID NUMBER(10), // parent subtree id
POSITION NUMBER(10), subtree position in the parent subtree
CONTENT CLOB //XML
)
CONTENT mapping is done using a UserType which takes the clob and creates a DOM.
So the transformation is done by hibernate and data are cached.
With small files it works fine, but with normal XML files (around 250Mb) I get an outOfMemory exception : Java Heap size.
Cached objects are never freed by session cache.
I used a profiler and I have no reference on my objects, there are only hibernate references.
I think that the problems comes from my cache configuration or maybe as i use UserType i have to evict the objects myself ?
Regards
William
mapping
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.airbus.hdom.dom.AdocDocumentFragment" table="XDB_ANCHORS" mutable="false">
<cache usage="read-only"/>
<composite-id>
<key-property name="docId" column="DOC_ID" type="int"/>
<key-property name="id" type="int" column="ID"/>
<key-property name="evo" type="int" column="EVO"/>
</composite-id>
<property name="parentId" column="PARENT_ID"/>
<property name="key" column="KEY"/>
<property name="isRemoved" column="ISREMOVED"/>
<property name="startOffset" column="START_OFFSET"/>
<property name="endOffset" column="END_OFFSET"/>
<property name="root" type="com.airbus.hdom.util.HibernateTypes.ClobToDomType">
<column name="CONTENT" sql-type="CLOB"/>
</property>
</class>
</hibernate-mapping>