OK, I got it to run with <ejb-local-ref> using the sample from
http://cwiki.apache.org/GMOxDOC20/very-simple-session-ejb-example.html

(which does contain a web.xml)

        <ejb-local-ref>
                <ejb-ref-name>ejb/Secured3</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                <local>ejb3.Secured3</local>
        </ejb-local-ref>

context = new InitialContext();
Secured3 secured3 = (Secured3) context.lookup("java:comp/env/ejb/Secured3");

I also needed a sys:dependency from geronimo-web.xml to openejb-jar.xml to
make the remote interface known to the JSP (this is missing in the above
sample).
First I simply included the ejb.jar into WEB-INF/lib, but this results in
ClassCastException on JNDI lookup (I guess because the Remote interface in
JNDI is from a different (the ejb) classloader than the cast target which is
from the web application).

Thanks,
Juergen


-- 
View this message in context: 
http://www.nabble.com/JNDI-Name-for-EJB3-tp24076429s134p24091435.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to