Hi All,

I have a question regarding controlling transactions specific to a session
bean doing business on behalf of numerous entity beans.

My session bean talks to 9 different CMP entity beans (9 different tables)
and 1 BMP bean (2 different tables) to create one complete object (an
Inventory Iem in our case). The BMP bean can be created only after ALL the 9
cmp beans have been successfully created.

How can I control the transaction in my session bean so that I can roll back
in case a failure occurs in any point of time during this numerous create()
calls ?

I was thinking about storing the primary keys of each cmp bean after it is
created and if at all a bean rolls back, I can go back and remove the prior
ones with a findByPrimaryKey followed by remove method. I wasnt too sure
about encapsulating all the create methods in one big transaction since that
might lead to nested transaction scenarios. Am I right?

Any pointers would be helpful.

Regards

Madhu

Madhusudan R Chaganthi
> Centers for Disease Control and Prevention
> NCID/SRP/IRM (404) 639-2462
[EMAIL PROTECTED]

In three words I can sum up everything I've learned about life:
It Goes On.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to