facebook

How to roll back CMP transaction for entity and session bean

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #238485 Reply

    gzhuye
    Member

    Hi, team:

    I have a problem with my CMP beans(session, entity bean) for roll back.

    2 entity beans(eA, eB), 1 container managed session bean(sBean). The sBean has a method(sMethod) to create eA and eB. All “trans-attribute” for eA, eB and sBean are “Required”. sMethod first creates eA, then creates eB. when it throws EJBException for failure to create eB, transaction is not rolled back, therefore, the record for eA-related table is created and not for eB-related table.

    Can anyone give me a clue? May it be because of “autocommit” property as true for mySQL? how to make it as false? or may it be from other causes?

    Thanks in advance!

    Paul

    #238488 Reply

    gzhuye
    Member

    Environment: myeclipse, jboss,mysql

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to roll back CMP transaction for entity and session bean

You must be logged in to post in the forum log in