We have an app which runs in weblogic, and I'm supposed to be making
it run in JBoss. The app's stateful session bean uses
SessionContext.getCallerPrincipal() to determine which user is logged
on.
On the client side, a servlet determines which user the user is
trying to log on as, and then does this:
String _initContextOverride = ...;
String _url = ...;
String _username = ...;
String _password = ...;
Context ctx = null;
Properties h = new Properties();
if (_initContextOverride != null)
h.put(Context.INITIAL_CONTEXT_FACTORY, _initContextOverride);
h.put(Context.PROVIDER_URL, _url);
h.put(Context.SECURITY_PRINCIPAL, _username);
h.put(Context.SECURITY_CREDENTIALS, _password);
ctx = new InitialContext(h);
and that's how it transmits the login information to the bean.
>From what I've heard on this list, this is not likely to work with
jboss as our EJB container. Now, my question is: have we picked a
really bad/non-standard/unusual/whatever way of doing this? Is there
a 'standard' mechanism for making ctx.getCallerPrincipal() return the
correct thing?
TIA
Tom
--
Tom Cook - Software Operations
"We rarely find that people have good sense unless they agree
with us."
- Francois, Duc de la Rochefoucauld
LISAsoft Pty Ltd - www.lisa.com.au
--------------------------------------------------
38 Greenhill Rd. Level 3, 228 Pitt Street
Wayville, SA, 5034 Sydney, NSW, 2000
Phone: +61 8 8272 1555 Phone: +61 2 9283 0877
Fax: +61 8 8271 1199 Fax: +61 2 9283 0866
--------------------------------------------------
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]