As the number of EJB objects in my system begins to grow, certain
dependencies have crept into the system.  For example, when object C
changes, object D must recalculate it's self, which in turn causes, object A
to change.

I see two ways of fixing this problem:

1. Direct method, simply have C call D and D call A when changes occur
2. Indirect method, use JMS to raise events when objects change

I think method 1 will introduce a lot of dependencies into the system, so I
am leaning toward method 2.  In method 2, however, there seems to be too
much overhead.  In other words, one must create a topic, create a listener
object, call the proper method in a different ejb.  Seems like too much work
just to tell D that C has changed.

Has anyone implemented method 2?  What some of the strategies have you used?
Did you have a single change topic or multiple topics?  How did you go about
the creation of topics?  Did you raise the CHANGE event from a setXXX
method, or from ebjStore() callback (when do you notify that this object has
changed)?  How do you avoid the recursion (A listens to D listens to C
listens to A) which could easily happen when objects are monitoring each
other's changes?

Thanks all for great replies on previous topics.

-AP_

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