geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Shamsi" <m.h.sh...@gmail.com>
Subject how to lookup ejb from jndi, in a stand alone client. ?
Date Tue, 08 Apr 2008 06:20:15 GMT
Hi All,

in Gmo 2.1, i want to lookup a EJB from a standalone client

i write this code :

        Properties environment = new Properties();
        environment.put("java.naming.factory.initial",
"org.openejb.client.RemoteInitialContextFactory");
        environment.put("java.naming.provider.url", "localhost:4201");

        try {
            InitialContext context = new InitialDirContext(environment);

            Object o = context.lookup("SampleBean");

but i got this exception :

javax.naming.AuthenticationException: Cannot read the response from the
server (OEJP/2.0) : null; nested exception is:
    java.io.OptionalDataException
    at org.openejb.client.JNDIContext.authenticate(JNDIContext.java:196)
    at
org.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:181)


any idea ?
-- 
sincerely yours
M. H. Shamsi

Mime
View raw message