cache « Load « JPA Q&A





1. Fail over load balancing and use of secondary cache.    forum.hibernate.org

I have just had a worry regarding fail-over/load balancing and use of secondary cache. Scenario: - The user starts a session, which is allocated to Server A. - Several pages are navigated, and the data are stored to hibernate - Load on the system is high and the Webserver allocates the next request to Server B. - The user returns to ...

2. Hibernate in load-balanced scenarios... caching problems?    forum.hibernate.org

Hi I am having a strange problem in Hibernate. I have a web app that is running in a load-balancing environment. So there are two physical servers responding to web requests. In the application, there is an action that updates a record, the hibernate code is doing: Code: session.save(loan); ...

3. Loading ALL objects in Cache... too many requests    forum.hibernate.org

Hello, I use Hibernate and EHCache. Imagine I have the following entities : Team, Player and a many-to-many relationship stored in Team_x_Player I would like to load in Cache everything at startup. I can do a From Team From Player From Team_x_Player if I put lazy="false" into my relationship, I will have as many jdbc requests as I've got team or ...

4. Hibernate cache under heavy load    forum.hibernate.org

We are currently caching all of our hibernate objects and queries using ehcache. We use the Spring OpenSessionInViewFilter to lazily access our objects. The site behaves normally and performs very well under light load, but we experience inconsistant behaviour when we send a lot of requests to application when the cache is empty. Basically many of the initial requests return with ...

5. property-ref not loaded from cache ?    forum.hibernate.org

Hmm, good to know, thanks. I'll try to avoid this in the future, I didn't know. Which are the best practices though when you need let's say three bidirectional one-to-one relationships from User to Address, let's say billingAddress, homeAddress and deliveryAddress ? I've allways solved this with fk from user to address and created three "fake" sublcasses for each type of ...

6. How to load an object from DB directly and not from cache ?    forum.hibernate.org

Hi, i am working with Hibernate 2.1.6 / Jboss / Oracle 9i. I noticed that Hibernate takes too many times for updating my objects in the DB. I have to questions : 1 - Where does Hibernate retrieve its datas when i am performing a query ? From DB directly or the cache (second level) ? The same question when i ...

7. Cached Collections are not loaded (copied)    forum.hibernate.org

Here are the involved mapping files. The first file contains a Abstract class: Second mapping file containing the class extending the Abstract class and defining the Bag for its relation with ...

9. Caching entity Object refs with lazy loading    forum.hibernate.org

Hello All, I have a (newbie-ish) question about caching object references for entities that have lazily loaded members. Should one ever cache object references to entities that contain lazily loaded entities as members, or instead should one only store entity id's and then use a session from Hibernate to load the object reference when needed (and only used with the context ...





11. SecondLevelCacheStatistics and load cache values    forum.hibernate.org

Regular Joined: Wed Sep 22, 2004 8:27 am Posts: 89 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2 Mapping documents: Code: Mercati ...

12. ArrayIndexOutOfBounds on loading cache entry    forum.hibernate.org

I'm using Hibernate 3.2.0.GA with JBoss Cache 1.3.0.SP2 in production. I know there is a known bug with this version of JBoss Cache on data replication ( http://jira.jboss.com/jira/browse/JBCACHE-843 ) but until this point I had not seen any adverse affects of the exception other than stale data in the target cache. This is shown in Stack Trace #2 below. Suddenly we ...

13. Reason why collection cache is populated after _loading_?    forum.hibernate.org

I'm writing an extension to Hibernate - a super-extra-lazy multimap. It will solve the following common problem: Suppose you have a user and his emails. The naive solution: public class User { public Set mails; ... } will be excruciatingly slow on most operations. Besides, it will be 2nd-level-cache-unfriendly. I'm going to add a new type "BigMultiMap" (I call them "bigmaps") ...

14. Does the log show my entities are loaded from cache?    forum.hibernate.org

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 ...

15. A Problem with Hibernate Lazy Loading and Caching    forum.hibernate.org

I've found an interesting case where Lazy Loading is causing a property to be set to null where it really shouldn't be. I've found an "acceptable" solution, but I'm wondering if theres a better way around what Im doing. Heres the case: I'm using Struts/Spring/hibernate, so this is a web-app. I have a Quote, which has an object property of type ...