Well, it IS done in the same thread. My MBean starts 1 thread which has a run method which starts out by logging in and attempting to access my EJBs – then I get the security exception. I am using JBoss 3.0.2.

 

Randahl

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Scott M Stark
Sent: 2. oktober 2002 18:50
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] How to log in from an MBean

 

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