Methods Summary |
---|
public java.lang.Object | createPerClass(org.jboss.aop.Advisor advisor)
try
{
String contextID = (String) advisor.getDefaultMetaData().getMetaData("JACC", "ctx");
//TODO: Get codesource
CodeSource ejbCS = advisor.getClazz().getProtectionDomain().getCodeSource();
String ejbName = ((EJBContainer)advisor).getEjbName();
JaccAuthorizationInterceptor jai = new JaccAuthorizationInterceptor(ejbName, ejbCS);
jai.setRealmMapping(getSecurityManager(advisor));
return jai;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
|
public java.lang.Object | createPerInstance(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor)
throw new RuntimeException("PER_VM not supported for this interceptor factory, only PER_CLASS");
|
public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new RuntimeException("PER_VM not supported for this interceptor factory, only PER_CLASS");
|
public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new RuntimeException("PER_VM not supported for this interceptor factory, only PER_CLASS");
|
public java.lang.Object | createPerVM()
throw new RuntimeException("PER_VM not supported for this interceptor factory, only PER_CLASS");
|
public java.lang.String | getName()
return getClass().getName();
|
public org.jboss.security.RealmMapping | getSecurityManager(org.jboss.aop.Advisor advisor)
Object domain = null;
Container container = (Container)advisor;
try
{
InitialContext ctx = container.getInitialContext();
SecurityDomain securityAnnotation = (SecurityDomain) advisor.resolveAnnotation(SecurityDomain.class);
if (securityAnnotation != null)
{
domain = SecurityDomainManager.getSecurityManager(securityAnnotation.value(),ctx);
}
}
catch (NamingException e)
{
throw new RuntimeException(e);
}
return (RealmMapping) domain;
|