Petit soucis avec hibernate !
J'affiche un Document ( blob oracle ) au format pdf dans IE, le tout via une action struts qui retourne un byteArray.
Tout se passe bien, le pdf s'affiche, malheureusement j'ai des soucis de perf et de lock et je m'apercois lorsque je debug hibernate qu'il y'a un update fait à chaque affichage du document. Hibernate detecte que le blob est "dirty" est donc a été modifié !!!
Quelqu'un a-t-il déjà rencontré ce problème ?? Cela peut il venir de ma conf hibernate pour le document ?? Si oui, je peux mettre la conf ici si besoin ...
Voici les logs bizarre que j'obtient :
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.loader.Loader;result row: EntityKey[com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.loader.Loader;Initializing object from ResultSet: [com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.persister.entity.AbstractEntityPersister;Hydrating entity: [com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.engine.TwoPhaseLoad;Version: 51
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.loader.Loader;done processing result set (1 rows)
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.jdbc.AbstractBatcher;about to close ResultSet (open ResultSets: 1, globally: 1)
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.jdbc.AbstractBatcher;about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.jdbc.AbstractBatcher;closing statement
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.loader.Loader;total objects hydrated: 1
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.engine.TwoPhaseLoad;resolving associations for [com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.DefaultLoadEventListener;loading entity: [com.darty.redbox.core.modele.catalogue.TypeDocument#5]
2007-10-02 17:49:49,069;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.DefaultLoadEventListener;creating new proxy for entity
2007-10-02 17:49:49,303;http-0.0.0.0-8080-1;DEBUG;org.hibernate.engine.TwoPhaseLoad;done materializing entity [com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,303;http-0.0.0.0-8080-1;DEBUG;org.hibernate.engine.StatefulPersistenceContext;initializing non-lazy collections
2007-10-02 17:49:49,303;http-0.0.0.0-8080-1;DEBUG;org.hibernate.loader.Loader;done entity load
2007-10-02 17:49:49,303;http-0.0.0.0-8080-1;DEBUG;org.hibernate.impl.SessionImpl;setting flush mode to: AUTO
2007-10-02 17:49:49,303;http-0.0.0.0-8080-1;DEBUG;com.darty.redbox.core.web.action.RedBoxDownloadAction;postHandle methode
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.springframework.transaction.interceptor.TransactionInterceptor;Invoking commit for transaction on javax.servlet.Filter.doFilter
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.springframework.transaction.jta.JtaTransactionManager;Triggering beforeCommit synchronization
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;flushing session
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;processing flush-time cascades
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;dirty checking collections
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;Flushing entities and processing referenced collections
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.persister.entity.AbstractEntityPersister;com.darty.redbox.core.modele.configuration.Document.blobFile is dirty
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.DefaultFlushEntityEventListener;Updating entity: [com.darty.redbox.core.modele.configuration.Document#103]
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.engine.Versioning;Incrementing: 51 to 52
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;Processing unreferenced collections
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;Scheduling collection removes/(re)creates/updates
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.pretty.Printer;listing entities:
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.pretty.Printer;com.darty.redbox.core.modele.configuration.Document{modificationDate=2007-04-10 17:08:30, typeDocument=com.darty.redbox.core.modele.catalogue.TypeDocument#5, blobFile=org.hibernate.lob.SerializableBlob@1686ad9, creationDate=2007-04-10 17:08:30, id=103, version=51}
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.event.def.AbstractFlushingEventListener;executing flush
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.jdbc.ConnectionManager;registering flush begin
2007-10-02 17:49:49,444;http-0.0.0.0-8080-1;DEBUG;org.hibernate.cache.UpdateTimestampsCache;Pre-invalidating space [T_DOCUMENT]
Partager