Hi,
i do have an external client that connects to the geronimo/openejb
server using the following code:
props.setProperty("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory");
props.setProperty("java.naming.provider.url", "127.0.0.1:4201");
props.setProperty("java.naming.security.principal", "system");
props.setProperty("java.naming.security.credentials", "manager");
InitialContext ctx = new InitialContext(props);
This works fine. If i comment out the lines specifying the
principal/credential i do receive the following exception
javax.naming.AuthenticationException: Cannot read the response from the
server (OEJP/2.0) : null; nested exception is:
java.io.EOFException
at org.openejb.client.JNDIContext.authenticate(JNDIContext.java:196)
at
org.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:181)
This again is as expexted. If i, on the other hand, use the following lines
props.setProperty("java.naming.security.principal", "");
props.setProperty("java.naming.security.credentials", "");
the client can connect to the server and lookup/use my - currently not
secured - EJB's.
Now, is there a way (maybe an attribute for the
geronimo/j2ee-server/1.0/car entry in config.xml) to require a valid
username/password from a geronimo realm for obtaining the InitialContext ?
Thanks in advance, Joerg Friede