That is what is needed, but it must be done in the context of the thread
making the ejb call.
 
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
Sent: Wednesday, October 02, 2002 4:55 AM
Subject: [JBoss-user] How to log in from an MBean

I am writing an MBean which should access my deployed EJBs. However, when I invoke my EJBs from it I get

 

java.lang.SecurityException: Authentication exception, principal=null

 

so, assuming that a login is necessary, I carried out a standard JAAS client login from my MBean like this

 

                                    LoginContext loginContext = new LoginContext(

                                                "myDomain",

                                                new MyCallbackHandler("userAccoutn", new char[]{'1', '2', '3', '4'})

                                    );

 

where �userAccount� is a user account I normally use for logging into my �myDomain� in JBoss.

 

This, however, does not work. I still get the authentication exception above. Is this approach incorrect? Is there a special login API for MBeans running inside JBoss, other than JAAS? Can you disable login requirements for MBeans?

 

Any help will be highly appreciated.

 

Randahl

 

 

Reply via email to