-
1. Re: MDB accessing security credentials
adrian.brock Jun 3, 2004 7:17 AM (in response to sanjewad)You need to perform a JAAS login.
The JBossMQ security domain protects the queues and topic access. -
2. Re: MDB accessing security credentials
sanjewad Jun 3, 2004 10:48 PM (in response to sanjewad)You mean Do I have to do
String username="test";
String password = "test";
System.setProperty("java.security.auth.login.config", "file:/C:/jboss-3.2.3/client/auth.conf");
SecurityAssociationHandler handler = new SecurityAssociationHandler();
SimplePrincipal user = new SimplePrincipal(username);
handler.setSecurityInfo(user, password.toCharArray());
LoginContext loginContext = new LoginContext("other", (CallbackHandler)handler);
loginContext.login();
Subject subject = loginContext.getSubject();
Set principals = subject.getPrincipals();
principals.add(user);
Hashtable hs = new Hashtable();
hs.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
hs.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
hs.put("java.naming.provider.url", "localhost" + ":1099");
and then look up the queue and send the message?.
I tried this and it does not seem that EJB inside MDB is getting this credentials.
Please help me . -
3. Re: MDB accessing security credentials
adrian.brock Jun 7, 2004 5:02 PM (in response to sanjewad)You problem is with the MDB accessing other ejbs.
Why do think peforming a login during the send will make any difference?
Moderated: If you use search you will find the options available to you discussed
many times.