Can you give some more information on the type of EJB server you are using?
I don't know how you are passing the principal object that you get from the LDAP to the JNDI lookup, can you let us know about your JNDI code?
Below is the code that shows an example of getting the initial context to the EJB server and then this initial context is used to lookup the Beans and to execute the method calls on them
private static Context getInitialContext() throws NamingException
Hashtable env = new Hashtable();
return new InitialContext(env);