I am having a problem with the EJB environment for Entity Beans and JNDI.

In my client code, I set the username and password in the JNDI's InitialContext:

Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
_config.getProperty("java.naming.factory.initial"));
props.setProperty("java.naming.provider.url",
_config.getProperty("java.naming.provider.url"));
props.setProperty("java.naming.security.principal", "admin");
props.setProperty("java.naming.security.credentials", "admin");
InitialContext context = new InitialContext(props);


I then get the ObjectFactory

UserHome userhome = (UserHome)context.lookup("test:ejb/User");


Do some business logic, and then create a new entry in the database.

...
...
...
...
user_home.create(username, credential, contact, profile);



When I call the create method, the username in the EJB environment is not the
same as the one I set in the InitialContext.  Why doesn't Orion keep the same
environment?



Reply via email to