database « Transaction « JPA Q&A





1. Transaction issue in java with hibernate - latest entries not pulled from database    stackoverflow.com

I'm having what seems to be a transactional issue in my application. I'm using Java 1.6 and Hibernate 3.2.5. My application runs a monthly process where it creates billing entries for a ...

2. How to make sure changes in the database that happen within a transaction are also seen by everything within that transaction    stackoverflow.com

I've got a transaction that saves or updates a set of objects in a database. This is the code:

@Transactional
public void updatePDBEntry(Set<PDBEntry> pdbEntrySet) {
    for (PDBEntry pdbEntry : pdbEntrySet) ...

3. Hibernate and "greatest value wins" logic    stackoverflow.com

I have a high_scores table in my database, it has two values:

player_id
highest_score
I need a repository method that saves a new high score. I don't really want to dirty up my ...

4. Database:Locking items for a specific period of time    stackoverflow.com

We are planning to use hibernate framework for an application which is something like an e-commerce application. We have a requirement in which, if an user checks out an item and proceeds ...

5. Hibernate: Accessing more than one database in the same transaction    coderanch.com

Hi: I need to access/insert/update to two databases at the same time using hibernate. So far, I have one hibernate config. file for eatch database, however this approach requirs me to start different transaction for each database. Is it possiple to access all databases in the same transaction? Is it possiple to merge the hibernate config. files? I am accessing MS ...

6. Hibernate: Accessing multiple databases within same transaction    coderanch.com

Hi all, I'm using Hibernate 3.2.5 ga, IBM WAS 6.1 and Oracle 10g. I need to access a couple of databases (different schema) for selects and updates. All these need to be within the same single transaction. Is using two-phase commit the only way to achieve this? If yes, how would I be able to do so using Hibernate and Oracle ...

7. Hibernate template puts a lock on database after 5-6 calss to it.    coderanch.com

Hello All, I am using Spring2.0 and hibernate 3.2. I take the application context in the following manner, as I am not using the Spring's dependency Injection. static ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"}); static SessionFactory sessionFactory = (SessionFactory) ctx.getBean("sessionFactory"); Now I don't know where I am committing mistake but when I call a hibernate function for 5-10 times, then ...

8. Transaction issue - latest entries not pulled from database    forum.hibernate.org

Author Message ger_eire Post subject: Transaction issue - latest entries not pulled from database Posted: Fri Mar 19, 2010 6:27 am Newbie Joined: Sat Mar 14, 2009 10:48 am Posts: 7 Hi, I'm having what seems to be a transactional issue in my application. I'm using Java 1.6 and Hibernate 3.2.5. My application runs a monthly process where it ...

9. Database lock during CacheSynchronization.beforeCompletion    forum.hibernate.org

Hi, I am experiencing a hung database in the following setup. I'm running GlassFish 3.0.1 on Linux. DB2 9.7 with type 4 driver. I have a Quartz job that invokes a stateless session bean (method myBeanMethod) with a container managed transaction (RequiresNew). The bean method communicates with my DB2 in two ways. 1) It starts off with doing a number of ...





10. When will Hibernate actually commit the database?    forum.hibernate.org

Hi everyone, I am using hibernate 3.3.2 in ejb3 with jta Code: org.hibernate.transaction.JTATransactionFactory java:comp/UserTransaction org.hibernate.transaction.JBossTransactionManagerLookup jta What I am trying to do in the ejb method is ...

11. Transaction that span over multiple database    forum.hibernate.org

A question regarding transaction spanning multiple databases: I have an application that needs to carry out a transaction that updates two different databases. The requirement is of a classic two phase commit transaction -- I need the update on both databases or none. I am not sure how to achieve this using hibernate as OR layer for both databases. Any help, ...

12. How to use string functions without db lock in    forum.hibernate.org

13. How to rollback database operations that have been flushed?    forum.hibernate.org

Hi, I'm going to embeed a workflow engine (Jbpm2) into my application. The target platform for running my application is Spring framework. JBpm2's is using Hibernate as its persistence layer. Before I go all the way embeeding Jbpm2 into my application, I conduct several small experiments. I'm concerned about transaction management. Here's one of the scenario that I tried: My application ...

14. locking and database access    forum.hibernate.org

how do i achieve the lock in accessing a single record from the Database? I retrieved a record using IE, then retrieved the same record using Netscape. I locked the record in IE so why is it possible to access it in Netscape? i used this line: getHibernateTemplate().get(,,LockMode.UPGRADE_NOWAIT) i tried to get the lock of the record using an external ...

15. Transaction not commited to db    forum.hibernate.org

16. Database Transaction Management in Hibernate    forum.hibernate.org





19. Can hibernate be used for cross database transactions?    forum.hibernate.org

Hi We are using hibernate2, spring framework, java, oracle10g and tomcat in our application. We want to move some of the tables to SQLServer 2005. So there would be tables related/associated to one another in both oracle and sql server. Can I use hibernate in this scenario to maintain persistence and transactions across two different databases? If so, please let me ...

20. hibernate for db without transaction?    forum.hibernate.org

MySQL configured as innodb (which I think is the default now) has full transaction support. Access does not work as the JDBC-ODBC bridge does not supply full JDBC support required. There maybe thrid party JDBC driver that might work. If considering Access why not try one of the very good Java DBs.

21. Session life cycle and committing to DB    forum.hibernate.org

Thank you for replying. I thought flush is only to move the changes to the persistence Context. The reason I am creating new transaction is because the generated code from hbm2java produces this: Code: public void attachDirty(Account instance) { log.debug("attaching dirty Account instance"); try { ...

22. XA Transactions / Multiple Databases    forum.hibernate.org

23. lock when commit to multiple database    forum.hibernate.org

Newbie Joined: Fri Sep 22, 2006 1:04 am Posts: 5 lock occured in ejb transaction when commit to 2 different databases simultaneously. as result: both database (data1 and data 2 are locked) but separately or not in transaction is ok. jboss 4.2.2, Hibernarte 3.2.5.ga Code: ... @Stateless @Local(value = ProcessingLocal.class) public class ProcessingBean implements ProcessingLocal { @EJB(beanName ...

24. How to commit/rollback transaction that spans multiple db ?    forum.hibernate.org

Hi, Due to the fact that you don't have the option of using a JEE container to handle transactions for you, it looks like your code is the best approach for simple cases. However, if your REAL code is much more complex, i.e. it spans multiple databases - not just 2, and there are concurrency issues, etc, you should probably look ...

25. Database rollback, but hibernate does not know about it    forum.hibernate.org

Hi We are currently using Hibernate 3.3.1 + Oracle 10G + Spring 2.5 for dependency injection, transactions etc We have run into a number of occasions recently where hibernate thinks there has been a commit (ie the code has run its course with no exceptions which should have resulted in a commit) however this has not resulted in actual rows committed ...

26. Unexpected Database Commit    forum.hibernate.org

In a webservice call to valid email settings, which is purely to take the settings passed in the DTO to use to attempt a connection to the email server and return a true/false, the following scenario is occurring If I make the webservice call and include the IDs in the DTOs, the settings are being committed to the DB. If I ...