I am having a similar problem where the first "principal" and
"credentials"
are ok but the second set of "principals" and "credentials" are ignored,
it
keeps using the first set as if it is cached within Orion somewhere.
The question is, are you doing the "new InitialContext(props)" twice,
and
the EJB's are always only picking up on the first one?
I have posted complete sample programs showing this problem in the hopes
someone will be able to tell me if this is truly a bug within Orion.
Regards,
Rob Lapensee
Director of Technology
Delfour Corporation
[EMAIL PROTECTED]
www.delfour.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, June 30, 2000 2:47 PM
To: Orion-Interest
Subject: Context Problem
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?