EJB programming & troubleshooting: BMP and CMT

  1. BMP and CMT (1 messages)

    First of all, thanks to everyone who took the time to answer my previous questions involving Container-Managed Transactions (CMT). I think I understand the principles fairly well now, but I am now confused by a related issue. I am using Bean-Managed Persistence (BMP) along with CMT. When I throw intentionally bad data at my application, I throw an EJBException and receive a message indicating the transaction was rolled back (which is exactly what I want). However, the database changes that have been made remain unchanged. I am curious if the issue involves my using BMP for persistence purposes rather than CMP. I am using EJB 1.1 on OC4J (which is Orion). Is there anything special I have to edit in my code or in the app server specific deployment descriptor to reconcile BMP with CMT? Or am I missing something totally obvious?

    Thanks again.

    Threaded Messages (1)

  2. BMP and CMT[ Go to top ]

    I also had a similar understanding earlier . But we need to specifically say con.rollBack() in order to rollbak any changes we make .Basically what most of the conatiner do is that they implement transactions by appropriate calls to ejbLoad and ejbStore . Now if in a BMP if there is an SQLException in ejbLoad or ejbStore the changes won't get rolled back .

    I hope it helps .

    thanx and regards