users@glassfish.java.net

Re: Help with sun-ejb-jar.xml setup for Remote EJB reference syntax

From: <glassfish_at_javadesktop.org>
Date: Fri, 01 Jun 2007 15:48:52 PDT

>Not always. If you use each @EJB injection corresponds to a <ejb-ref> behind the sense. >Even if you don't have <ejb-ref>, or no ejb-jar.xml at all, you can still look up the injected >EJB resource. For example,

 So what would the format be in the sun-ejb-jar.xml file? It doesn't like it without the <ejb-name> entry, but if I put that in, it says it can't find the bean with that name. But its on a remote server.

>InitialContext ic = new InitialContext();
>FooRemote foo = (FooRemote) ic.lookup("java:comp/env/fooejbref");

 Since this is a remote EJB, we tried creating an InitialContext() by sending in a Properties object with the ORB values pointing to the remote server.
This didn't seem to work, and from what I've read, you are not supposed to do this within in EE environment anyway.

 I really just need a sample xml file that glassfish will except for a remote lookup without the actual bean on the local machine (only the interface).
[Message sent by forum member 'mlingk' (mlingk)]

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