Transaction scope


EJB programming & troubleshooting: Transaction scope

  1. Transaction scope (1 messages)

    I defined a stateless session bean that has a method with transaction attribute REQUIRED.
    This method executes two SQL update statements using JDBC getting the connection from the DataSource, first update was successful and the second update failed with EJBException. The result is that first update is committed.
    I expected that the changes of first update will be rolled back because the second update failed and these two queries are part of a transaction. We ran this on Weblogic 8.1.

    Please explain.

    Thank you.
  2. Transaction scope[ Go to top ]

    Per JDBC java.sql.Connection interface "If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions".