hello all,
I am trying to find a bean from inside another bean , I am getting the
JNDI name from env , The question is how do i get hts SECURITY_CREDENTIAL to
do the look up ??
what i am doing right now is
public void foo()
{
try
{
Properties prop = this.cntx.getEnvironment();
String AdminHomeName = (String) prop.get("JNDIAdminName");
AdminHomeName = AdminHomeName.trim();
AdminHome aHome = ( AdminHome) ctx.lookup(AdminHomeName);
Admin Admin = aHome.create();
admin.addToGroup('abc', this.userName);
}
catch ( Exception ( Exception e )
{
throw new SecurityException( e.getMessage() );
}
}
public Context getInitialContext() throws NamingException
{
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");
java.security.Identity identity = this.cntx.getCallerIdentity();
h.put(Context.SECURITY_PRINCIPAL, identity);
return new InitialContext(h);
}
I can get SECURITY_PRINCIPAL but how do i get SECURITY_CREDENTIAL ??
- thanks
sethu
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".