[jboss-user] [JBoss Cache: Core Edition] - Re: Hibernate/Writes but does not loads
skajotde
do-not-reply at jboss.com
Mon Jul 28 15:29:10 EDT 2008
Looks ok ;)
Try enable DEBUG logging on org.hibernate.cache category.
and cache is used in second and next retrieves from databases ;)
public void findByIdTest() {
long initTime= System.currentTimeMillis();
Fund f = em.find(Fund.class, 1718);
System.out.println(f);
// Should cause "Cache hit" in logs
Fund f2 = em.find(Fund.class, 1718);
System.out.println(f2);
System.out.println("Spent:"+(System.currentTimeMillis()-initTime)+"\n");
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167160#4167160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167160
More information about the jboss-user
mailing list