Hi all,
We are migrating a J2EE application from JBoss to SAP Netweaver using Hibernate as persistence engine. The application starts OK, even doing some read-only accesses to the database (via Hibernate) but once up & running we are having a very-basic transactional problem:
Abstract: a Container Managed Transaction gets blocked for ever when an update SQL sentence comes after an insert SQL sentence on the same database row.
Product versions:
* SAP Netweaver Web Application Server 6.40 PatchLevel 87289.311
* Microsoft SQL Server 2005
* JDK 1.4.2_10
* Hibernate 3.1
* System JDBC driver (by DataDirect)
Description: we have a Stateless Session EJB with CMT. One of its methods is configured with "Required" transaction attribute. That method creates a new persistent instance (via Hibernate session) and then modifies it. When the method runs the transaction gets blocked and never ends. When we look at the database connections established between the app server and the database we see two different connections: one that performed the insert but could not finish and another one (suspended) that is trying to do the update on the same row but is blocked by the previous connection. As a result the transaction does not end and the method never returns. Why the first connection never ends (never gets released) ? Why the Transaction Manager creates two different physical connections for the same transaction? In that case, why the Transaction Manager does not enlist them as part of the same transaction ?
Same code works fine in JBoss Application Server.
We can provide configuration and log files as needed.
TIA,
Martin
|