I don't know if this is a bug in Orion or not, but here is what I found

1)  You can look up the fully qualified remote interface name
("com.foo.EJBRemoteInterface") -- Note that you lookup the remote interface,
but it returns the Home interface
2)  You can add the <ejb-ref> tag to the application-client.xml file under a
META-INF directory where you start the client application

<application-client>
        <ejb-ref>
                <ejb-ref-name>ejb/FooHome</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                <home>com.foo.FooHome</home>
                <remote>com.foo.Foo</remote>
        </ejb-ref>
</application-client>

-----Original Message-----
From: Claes Theander [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 8:20 AM
To: Orion-Interest
Subject: Stand-alone-client


Hello!

I'm trying to connect to my EJB's from a stand alone client like this:

    Properties prop = new Properties();

prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");


prop.setProperty("java.naming.provider.url","ormi://localhost/myApp");
    prop.setProperty("java.naming.security.principal","admin");
    prop.setProperty("java.naming.security.credentials","123");
    Context con = new InitialContext(prop);
    boundObject = con.lookup("java:comp/env/ejb/XXXHome");
    xxxHome =
(XXXHome)PortableRemoteObject.narrow(boundObject,XXXHome.class);

Im getting this error message:
"javax.naming.NameNotFoundException: java:comp/env/ejb/XXXXXXHome not
found."
I know that the EJB's are working cause I'm able to access them from a
jsp-page.
I have refs to the EJB in application-client.xml.

Any suggestions ?
/C.





Reply via email to