users@glassfish.java.net

Re: Dynamic lookup of a local session bean

From: <glassfish_at_javadesktop.org>
Date: Tue, 05 Feb 2008 12:17:40 PST

I assume that when you say "by requiring an explicit reference on the managed object/context" you mean an @EJB reference in the bean so it can be injected, yes?

Or are you talking about having to have a local ref in the ejb-jar.xml for all of the beans?

Because, that's how the MDB would access a local bean in the old days, via a ejb-local-ref in the ejb-jar.xml.

The ejb-jar.xml is what basically sets up the java:comp/env area of an EJB anyway.

It's an assembly issue, and you don't (shouldn't) need to change the source code of the bean to add the reference.

Recall that the Session and Message beans in JEE 5 aren't much different as what we had in 1.4, we just get some annotations to clean up the dev cycle. So, old school 1.4 JEE still works.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=257551