Imagine an organizational chart for your company comprised of many People
EJBs. Some People have descendants that represent their subordinates, and
these people have subordinates, etc. I have multiple clients that can make
changes to these objects.

Suppose I have a business rule whereby, if a People EJB gets a bonus, the
same
bonus is applied to all of his/her subordinates. (Wish this was real life!)

Stage set, here are the questions:

1) Would this business rule be enforced within a session EJB or the People
(entity) EJB?

I will assume a session for the next questions...

I can imagine a recursive routine that applies the bonus to the People EJB
in
question, gets a list of children, and calls itself for each child. This
will
effectively traverse the branches.

2) Do the EJB transactions provide me with protection to prevent someone
else
from modifying the first People EJB while I'm off changing children.

3) Likewise, must I acquire some kind of lock on my entire set of People
objects prior to making my changes. What if someone deletes a People EJB
after
I get a list of children?

4) If one of my child People EJBs cannot have a new bonus applied (due to
some
other business rule) will/can all of the other object changes be rolled
back?

5) One of the major strengths of the EJB framework is the concept of
transactions. Are there any online resources to learn more about how these
work?

Thanks,
jim

===========================================================================
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