| public class RoleBasedAuthorizationInterceptorFactory extends
PerClassAspectFactoryAdaptor
| implements AspectFactory
| {
|
| public Object createPerClass(Advisor advisor)
| {
| // Must be a separate line (EJBContainer cannot be dereferenced)
| EJBContainer container = EJBContainer.getEJBContainer(advisor);
| SecurityDomain securityAnnotation = (SecurityDomain)
advisor.resolveAnnotation(SecurityDomain.class);
|
| //If there is no annotation, return a null action interceptor
| if(securityAnnotation == null)
| return new NullInterceptor();
| CodeSource ejbCS = advisor.getClazz().getProtectionDomain().getCodeSource();
| String ejbName = container.getEjbName();
| return new RoleBasedAuthorizationInterceptorv2(container, ejbCS, ejbName);
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140666#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...