Why Do Two Methods Of A Stateless Session EJB 3.0 Use The Same Transaction?

(Doc ID 790455.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Containers for J2EE - Version to [Release AS10gR3]
Oracle TopLink - Version to [Release AS10gR3]
Information in this document applies to any platform.


With an EJB defined as

@Stateless(name = "WebService")

  @PersistenceContext(unitName = "Service")
  private EntityManager em;

  SessionContext sessionCtx;

  public ...method1(EntityManager em,...) ..{

  public ...method2() ..{
    try {
    } catch (Exception e) {

why do method1 and method2 run under the same transaction  (method 1 is called by method 2) ?


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms