geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Friede <>
Subject how to require authentication for obtaining initialcontext?
Date Sun, 21 May 2006 20:46:33 GMT

i do have an external client that connects to the geronimo/openejb 
server using the following code:

props.setProperty("java.naming.provider.url", "");
props.setProperty("", "system");
props.setProperty("", "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:
        at org.openejb.client.JNDIContext.authenticate(

This again is as expexted. If i, on the other hand, use the following lines

props.setProperty("", "");
props.setProperty("", "");

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

View raw message