Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:20:08+00:00 2026-05-29T12:20:08+00:00

Im primarily using Hibernate to reduce the memory consumption of my application because I

  • 0

Im primarily using Hibernate to reduce the memory consumption of my application because I can store data in the database instead of in memory. Essentially there is one main entity Song that represents a Music File loaded from a directory, but the first thing I do after adding a song to the database (using hibernate) is add it to a pipeline of executors for further processing, so that instances of object representing each song are still in memory and remain so until the song has been processed so Im not saving much memory.

My first thought was for me to just store the ids of the songs when I add them to the pipleline and only get the actual entity when it is required to be processed but this seems to be working against rather than with Hibernate.

Instead I wondered if I used Ehcache with Hibernate configured to use a Disk Cache would that mean the instances Im using wouldn’t be using much memory or would they use as much memory as before once I’d actually had a reference to them in my application.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:20:10+00:00Added an answer on May 29, 2026 at 12:20 pm

    If you have a reference to an entity, then obviously the object is in memory (unless the reference is a reference to a lazy-loaded proxy).

    EHCache is used to avoid going to the database too often, and get the entities from the in-memory or on-disk cache. Using it will increase the memory, not decrease it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for the best solution to store Java EE application's global data using
So my web application is primarily using XML for client to server interaction and
I am using Hibernate for my all database related task . I am using
I have build my data model using JPA and am using Hibernate's EntityManager 3
I am using Hibernate (JPA) with Derby database - my app server is Jboss
I am using hibernate 3 and attempting to delete a record in the database,
I'm using NHibernate primarily against an MSSQL database, where I've used MSSQL schemas for
I am using WCF RIA services with silverlight. Obviously I am using this primarily
Are there any repercussions using Negative Primary Keys for tables (Identity Increment -1, Identity
I'm currently moving a (working) app from using EclipseLink to Hibernate JPA, mostly it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.