I've got a question about ejb-ref and ejb-local-ref... An enterprise bean can refer to the homes of other enterprise beans using "logical" names called EJB references. References to other beans can be local or remote. But, message driven beans have no unique identity to clients � they don�t have clients (NO home interface, NO component interface, and no local vs. remote).
So, my question is : Is it possible to define a <ejb-ref> or a <ejb-local-ref> elment for message-driven beans??? I mean is it possible to define this in the DD WITHOUT a <home> and <remote> element for <ejb-ref> or a <local-home> and <local> for <ejb-local-ref>???
I also thought that the <ejb-ref-type> element should NOT be a message-driven bean (and that the <res-ref-type> could only be either �Session� or �Entity�).
Please, help me out. I'm confused... Confused
(I also posted this question on jdiscuss.)
I not only use all the brains that I have, but all that I can borrow. [Laurence J. Peter]
If I understand your question correctly, according to my understanding- It is possible to have (MDBs) refering Entity or Session beans. (as Ravindra explained.) But no type of EJB can refer to MDB in ejb-ref.
I was ever confused by <ejb-ref> and <ejb-local-ref> before. Actually, <ejb-ref> and <ejb-local-ref> mean that you want to use other bean <ejb-ref> inside a bean and you have to specify it in DD. For example, in a Message Driven bean, you want to use a Session Bean (MySessionBeanRemoteHome), then you must define this session bean as <ejb-ref> or <eib-local-ref>, just like above DD written by Ravindra Janapareddy.
Hope this help.
Don't MAKE me come back there with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss