This content has been marked as final.
Show 2 replies
-
1. Re: SecurityAssociation deprecated methods
anil.saldhana Jun 18, 2008 5:33 PM (in response to clebert.suconic)For thread based usage, you will need to know the name of the security domain for your application. Then, you need to establish a security context on the thread:
SecurityContext sc = SecurityContextFactory.createSecurityContext(string securitydomainname, Principal, Object, Subject); SecurityContextAssociation.setSecurityContext(sc);
Look at the security/security-spi and security/security-jboss-sx projects -
2. Re: SecurityAssociation deprecated methods
anil.saldhana Jun 18, 2008 5:36 PM (in response to clebert.suconic)In JBAS5, you can inject a SubjectFactory and forget about internal details of security.
private Subject getSubject() { Subject subject = null; if(subjectFactory != null && securityDomainJndiName != null) { subject = subjectFactory.createSubject(securityDomainJndiName); } if (trace) log.trace("subject: " + subject); return subject; }
as in
http://anonsvn.jboss.org/repos/jbossas/trunk/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java