On Dec 11, 2007 8:32 PM, maho77 <[EMAIL PROTECTED]> wrote: > - I have a annotations.jar deployed as common lib. This jar contains some > annotations > - I have a bean (I call it ModifyBean) that modifies objects that contain > these annotations.
What's "a bean"? Is it an ejb or a managed (backing) bean or merely a pojo? > - The ModifyBean will be used by several other beans (BeanA, BeanB, ...) The > ModifyBean has to be independent from BeanA, BeanB, ... What does it mean "to be used"? Does ModifyBean process "other beans, e.g. BeanA and BeanB"? > - The ModifyBean is dependent from the annotation.jar, because it looks > after this annotations in the objects that have to be modified It looks as if ModifyBean proceeses other beans. (If ModifyBean's an ejb, I could know the answer, but need to wait a bit to ensure myself I'm right) > - The other beans BeanA, BeanB are also dependend from annotations.jar > because some entities make use of the annotations. BeanA and BeanB are also > dependent from ModifyBean because the BeanA and BeanB calling the modify > method from ModifyBean to modify the entities. BeanA, BeanB depend on annotations.jar BeanA, BeanB depend on ModifyBean ModifyBean depend on annotations.jar Right? > My problem is that the ModifyBean has to know BeanA and BeanB, to know the > entities which should be modified. ModifyBean.modify(entities) would do the trick, right? > The deployment of BeanA, BeanB and the > ModifyBean failes. Further I don't want that the ModifyBean knows BeanA or > BeanB, because I have some other beans that should be modified by the > ModifyBean and I don't want add the dependencies to openejb.xml each time I > have to add a new bean that want's to use the ModifyBean. You might take a look at the interceptors feature of ejb3. It lets you intercept business method calls as well as lifecycle events and therefore do something in addition to the original call or a lifecycle change. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
