Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Hibernate Caching Entities

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

In my application in heap dump I have found a map of org.hibernate.cache.HashtableCache it has couple of entries and the one with highest memory consumed one is  a collection of one of the entity.



Do I need to add any step to avoid Cache in Hibernate once serviceMethod is out of scope?
this is one place where this entity is used, I am looking into other places where same entity is used and aiming to clear cache once called any service method is complete.
thanks.
 
jyoti j singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I noticed following important statement



not sure how to edit my previous post so adding new...
 
jyoti j singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


after following step, I wish to detach entity from managed state
       entityManager.persist(entity);


I can see      entityManager.clear(); but it acts on all managed entities.

I can see         entityManager.detach(entity); in online API doc but in my application         entityManager.detach(entity); is not showing  

How can I detach a given entity, any suggestion please?




 
jyoti j singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Current jar file is > ejb3-persistence.jar
& meta-inf info is >
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.0-b16 (Sun Microsystems Inc.)
Built-By: hibernate.org
Specification-Title: EJB 3.0
Specification-Version: 3.0 Final Release (1.0.2.GA)
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: EJB
Implementation-Version: 3.0 Final Release (1.0.2.GA) January 5 2011
Implementation-Vendor: hibernate.org

Which jar I should use instead of  ejb3-persistence.jar for JPA2 implementation  
 
Water proof donuts! Eat them while reading this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic