-->
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: Does the log show my entities are loaded from cache?
PostPosted: Wed Sep 10, 2008 1:21 pm 
Newbie

Joined: Tue Jun 10, 2008 3:51 am
Posts: 10
Quote:
2008-09-10 15:57:31,546 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 5001353017532416
2008-09-10 15:57:31,546 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2008-09-10 15:57:31,546 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2008-09-10 15:57:31,546 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2008-09-10 15:57:31,546 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
2008-09-10 15:57:31,546 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2008-09-10 15:57:31,546 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2008-09-10 15:57:33,281 DEBUG [org.hibernate.SQL] /* select s from ContestStatus s */ select conteststa0_.contest_detailed_status_id as contest1_10_, conteststa0_.contest_detailed_status_desc as contest2_10_, conteststa0_.name as name10_, conteststa0_.contest_status_id as contest4_10_ from contest_detailed_status_lu conteststa0_
2008-09-10 15:57:33,281 INFO [STDOUT] Hibernate: /* select s from ContestStatus s */ select conteststa0_.contest_detailed_status_id as contest1_10_, conteststa0_.contest_detailed_status_desc as contest2_10_, conteststa0_.name as name10_, conteststa0_.contest_status_id as contest4_10_ from contest_detailed_status_lu conteststa0_
2008-09-10 15:57:34,250 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#6]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#1]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#2]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#3]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#4]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#5]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#7]
2008-09-10 15:57:34,250 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.mycompany.ContestStatus#8]
2008-09-10 15:57:34,562 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2008-09-10 15:57:34,921 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2008-09-10 15:57:35,234 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2008-09-10 15:57:35,234 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#6]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#6]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#1]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#1]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#2]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#2]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#3]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#3]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#4]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#4]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#5]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#5]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#7]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#7]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.mycompany.ContestStatus#8]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.mycompany.ContestStatus#8]
2008-09-10 15:57:35,234 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections


My ehcache configuration is
Code:
<ehcache>
    <defaultCache
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="1020"
        timeToLiveSeconds="1020"
        overflowToDisk="true"
        />

    <cache name="com.mycompany.ContestStatus"
        maxElementsInMemory="1"
        eternal="true"
        timeToIdleSeconds="3000"
        timeToLiveSeconds="6000"
        overflowToDisk="true"
        />
</ehcache>


I call "select * from ContestStatus" twice, the log is from the second time calling. From the log, I guess ContestStatus entities are not retrieved from cache, loaded from another sql queries. But cannot figure out what is the problem.


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.