cache « Transaction « JPA Q&A





1. Bypassing the Hibernate cache in a transaction    stackoverflow.com

I have a strange use case of Hibernate where in a call farther up a large stack needs an unmodified copy of an object that is part of a hibernate transaction. ...

2. Jboss cache replicates no changes when used from Hibernate    stackoverflow.com

We are using jboss cache as second level hibernate cache. It is configured to evict changed entities asyncronously. But this feature does not work for us. Some debugging revealed the root ...

3. JBoss Cache Configuration    stackoverflow.com

I'm using an extended persistence context (injected Entitymanager at SFSB) and have additionally set @TransactionManagement(value=TransactionManagementType.BEAN) for the SFSB to have full control over the UserTransaction. The Transaction is controlled on client side ...

4. Hibernate SQLQuery bypasses hibernate session cache    stackoverflow.com

I'm "transactionalizing" some extensive database manipulation and I came across this issue where if I run sql queries through hibernate but not using the MQL approach, the view of the database ...

5. Database trigger and Hibernate    stackoverflow.com

I've met a scenario:

  1. save or update some data in a target table by hibernate
  2. there is a trigger on the target table which will be executed before insert or update operations of ...

6. HHH-3818 cache lock issue    forum.hibernate.org

7. L2 Cache failing to acquire lock . . . on "fqn=/" ??    forum.hibernate.org

So first off, apologies for the double post. My initial post had a bad subject line, and at this point, I think has been relegated to the netherworld known as "page 2". I'm hoping a more descriptive subject will help, and if not, I promise, no triple posts. I'm a veteran Hibernate user, but this one's got me stumped. I have ...

8. Hibernate cache consistency in JTA transaction    forum.hibernate.org

Hello Is there a way to force the hibernate session cache to synchronize with a JTA transaction ? AFAIK, JTA integration of hibernate deals with connections used by hibernate but not the cache. Say I have an object in my cache. Then I open a JTA transaction. Then I modify my object via hibernate, do a update and a flush, then ...

9. What to do? "Cache item was locked"    forum.hibernate.org

Environment: Hibernate 2.1RC1 + Spring 1.0 M4 + Ehcache I want to use the read-write cache functionality but everytime the session looks up an object it has to be reread from the DB. The class has an element and I've specified dynamic-update="false" and dynamic-insert="false". The Session is the only current active session and there is no other transaction running ...





10. Cached item was locked    forum.hibernate.org

Hi, I'm using the second-level cache (EHCache Implementation) and read-write cache concurrency strategy for all classes and collections. Sometimes, when I try to load an instance of a class, I see on the debug logs this message: Cached item was locked: 65537, and hibernate go to the database to recover this object instead of the cache. When read-write cache lock an ...

11. Cache concurrency options    forum.hibernate.org

Hi, I'm trying to understand the JBossCache concurrency options for the element. I have an application which has exclusive access to the database. I want to cache reference data that is infrequently updated but frequently read by the web app. The only choices are 'read-only' and 'transactional'. What data is 100% read only? There will be maintenance of ...

12. JBoss Cache Commit with UseQueryCache=true Issue    forum.hibernate.org

Newbie Joined: Fri Sep 10, 2004 9:46 am Posts: 10 I have a problem with using Hibernate and have isolated it to the setting QueryCacheEnabled=true. With this set to false the bug is not present and the application works flawlessly. When QueryCacheEnabled is set to true the error occurs. Below is a description of how things work. The error, and my ...

13. ReadWriteCache - item expired by cache while locked    forum.hibernate.org

using 2.1.6 and ehcache, with a read-write cache, i'm seeing this warning: Code: ReadWriteCache - An item was expired by the cache while it was locked (increase your cache timeout) this happens in a long running transaction, it lasts about 15 minutes, and i'm doing lots of flushes during the transaction (i need to get the DB generated primary key). basically ...

14. JTA and JBossCache - Is it really Required?    forum.hibernate.org

I want to use Hibernate's TreeCacheProvider and I've seen several documents and postings that lead me to believe that TreeCache requires a JTA environment. But there are several others that lead me to believe that I don't. I've got a simple environment with only one database, so JTA seems like overkill. Is JTA required for JBoss TreeCache to work properly in ...

15. Transaction.rollback() and Session cache    forum.hibernate.org

Hibernate version:2.1.3 I'm trying to understand how the session cache works with rollback. I have some code that: 1 - opens a session 2 - creates a transient object 3 - begins a transaction - Session.beginTransaction() 4 - saves the transient object - Session.saveOrUpdateCopy() (which should be the same as a simple Session.save() in this case, right?) 5 - rolls back ...

16. "An item was expired by the cache while it was locked&q    forum.hibernate.org

Hibernate version: 3.0.3 What can be done about these error messages? ReadWriteCache.java:214 - An item was expired by the cache while it was locked (increase your cache timeout) I get about 70000 of them when I do an update that comes in via XML (about 6000 elements with subelements). The XML comes in on a app level above hibernate and loops ...





17. Cache locking problem    forum.hibernate.org

Hi all, I am facing a problem with cache locking. The code is as follows: Inside "onUpdate" (Lifecycle) method, I open one more session and save different object to database. Then I close this new session and refresh current session. These two sessions are part of same transaction. public boolean onUpdate(Session session) throws CallbackException { SessionFactory sessionFactory = ServiceLocator .getInstance().getHibernateSessionFactory(); Session ...

18. Hibernate cache between transactions    forum.hibernate.org

Newbie Joined: Tue Aug 08, 2006 10:23 am Posts: 1 Hi, Can I use Hibernate cache in different transactions? I need something like this: class: Code: public class Expression { private Log log = LogFactory.getLog(getClass()); private String id; private String name; private String expression; ...

19. Item Expired by cache while locked    forum.hibernate.org

Hi, I was running a batch job to persist and merge about 32000 rows of data (each row corresponds to 1 parent object with about 5 associations). The batch completed successfully in about 2100 seconds, but I got a lot of warnings after the job completes: Code: WARN ReadWriteCache - An item was expired by the cache while it was ...

20. Weird transaction rollback and Cache invalidate problem.    forum.hibernate.org

Hi, We are using Hibernate 3.0 with JBoss 4.0.3 app server. We came across a weird problem with hibernate- it automatically rollbacks transaction with no obvious reason .The problem is intermittent- probably occurs when the server is started, few transactions are performed and then kept idle (no transactions) for few days and then again perform some transaction. Here is the log ...

21. Transaction rollback and Cache invalidate problem.    forum.hibernate.org

Hi, We are using Hibernate 3.0 with JBoss 4.0.3 app server. We came across a weird problem with hibernate- it automatically rollbacks transaction with no obvious reason .The problem is intermittent- probably occurs when the server is started, few transactions are performed and then kept idle (no transactions) for few days and then again perform some transaction. Here is the log ...

22. Problem with Hibernate and JBoss Cache's optimistic locking    forum.hibernate.org

Hibernate version: 3.2.2.ga JBoss Cache version: 1.4.1.sp2 Hibernate config XML: Code: org.hsqldb.jdbcDriver jdbc:hsqldb:mem:temp

23. Exception when using JBoss Cache with optimistic locking    forum.hibernate.org

SessionFactory factory = new AnnotationConfiguration().configure().buildSessionFactory(); TransactionManager txManager = DummyTransactionManager.getInstance(); txManager.begin(); Session session = factory.getCurrentSession(); session.createQuery("update ...

24. Hibernate + JBossCache + bulk updates = lock problem    forum.hibernate.org

I'm using: Hibernate 3.2.3 JBossCache 1.4.1SP3 with pessimistic locking I'm having considerable problems doing bulk updates with jbosscache. Something in the way hibernate evicts entities for jbossCache after a bulk update gives me major locking problems if I read any of the objects involved in the bulk update within the same transaction as the bulk update. I've tried setting CacheMode.IGNORE on ...

25. Hibernate with Transaction Manager and Caching    forum.hibernate.org

My company is fairly new to using Hibernate beyond a basic tool for mapping java classes to the database. We're currently running a clustered Linux Apache/Tomcat5.5 environment with an AS400 backend. The application that I'm working on now is using Transactions, which we've never used prior to my pushing for it due to the extra little bit of setup and maintenance ...

26. Cache or Memory leak problem leads to dead lock    forum.hibernate.org

Newbie Joined: Wed Nov 05, 2008 10:51 am Posts: 1 Hibernate version: 3.2.6 Mapping documents: Full stack trace of any exception that occurs: Name and version of the database you are using: MySQL 5.0 The generated SQL (show_sql=true): false We are working on a project... however since yesterday we get hte folowing error! please help Code: Nov 4, 2008 7:06:55 AM ...

27. Cached item was locked    forum.hibernate.org

I have an Entity that I am caching. That entity has a One-Many Bi-Directional Relationship with both sides being Lazily Fetched. I am using a ReadWriteCache with EHCache. I am trying to avoid hibernate generating select statements. The cache works good for the main entity, but it is still generating select statements for each element in the One-Many list. I get ...

28. Cache Concurrency    forum.hibernate.org

Hi! I'm workin on a Service (EJB with Spring, Hibernate and EhCache). I am caching the querys from database and everything works fine. Now i have to modidy same data from a Web Application and i have a concurrency situation: if a modify the data from the WebApp, the EJB service get the data from cache, so i am getting out ...