These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Java heap size : cache configuration
PostPosted: Mon Aug 21, 2006 11:59 am 
Newbie

Joined: Mon Aug 21, 2006 11:47 am
Posts: 5
Hibernate version:3.1
Name and version of the database you are using: Oracle 9i

Bonjour,

Je réalise une étude pour la mise en place d'un cache DOM au-dessus d'une base Oracle via hibernate.
Cette base contient des documents XML stockés sous forme de sous arbres.
Voici la table :
Code:
CREATE TABLE XDB_ANCHORS
(
DOC_ID        NUMBER(10),
ID            NUMBER(10), //id du sous-arbre
PARENT_ID     NUMBER(10), // id du sous-arbre père
POSITION  NUMBER(10), //position du sous-arbre dans le sous-arbre parent
CONTENT       CLOB //XML
)

Le mapping du CONTENT est fait via un UserType qui à partir du XML cré un DOM.
Hibernate se charge ainsi de cette transformation et le DOM est géré en cache.

Sur des petits fichiers cela marche tres bien, mais sur des gros fichiers, j'obtient un outOfMemory : Java Heap size.

Apres vérification, j'ai constaté que les objets n'etaient jamais libérés pour faire de la place aux nouveaux objets. J'ai également utlisé un profiler pour etre sur de ne garder aucune reference et les seules references sur mes objets sont celle provenant d'hibernate.

J'aurais voulu savoir s'il était possible de configurer le type de references utilisé par le cache session d'hibernate (weak, strong, soft).
Si vous avez d'autres idées elles sont les bien venues.

merci

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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.