[jboss-dev-forums] [Design of EJB 3.0] - Re: RoleBasedAuthorizationInterceptorFactory dependencies
anil.saldhana@jboss.com
do-not-reply at jboss.com
Tue Apr 1 14:04:00 EDT 2008
| 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#4140666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140666
More information about the jboss-dev-forums
mailing list