I am using the <security-domain> and <security-proxy> features on jboss3.0.4 and it work well when looking up EJB's from client applications or other EJB's.
However when I do a lookup for EJB's (that are registered under a 'simple' security-domain in jboss.xml) from an MDB I only get 'guest' as the Caller Principal in my EJB.
No matter whether I do Jaas login or not, use any other domain (eg client-login in the call belwo) I still get 'guest' set as the Caller Principal. Can anyone please provide pointers/help ?
I have looked at the thread below, but that does not talk about MDB's.
PasswordCallbackHandler aCallbackHandler = new PasswordCallbackHandler("foo", "foo");
LoginContext lc = new LoginContext("simple", aCallbackHandler);
Context myctx = new InitialContext();