Results 1 to 2 of 2

Thread: Hibernate Transaction

  1. #1
    Join Date
    Nov 2005
    Posts
    5

    Default Hibernate Transaction

    Hello experts

    I have a question about transaction management . I am using HIbernateTemplate to access Hibernate . I do understand that If I am using cache , then all the objects are stored in cache and they will be persisted when the session is flushed. When I am using transaction manager , the sessil flush will be done during commit.
    My question is how do I get control to this commit process. I want to remove some objects from the Hibernate cache before the session is flushed.

    Thanks
    Sunil

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Hibernate contains 2 caches - first level (session cache) and second level (external to Hibernate). For the first level use Session.evict for the second use SessionFactory methods.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •