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