If you are using the EJB deployment descriptor to configure security, I'm afraid that
you can't use security aspects from aspect library to access this configuration.
According to this documentation:
http://docs.jboss.org/aop/1.1/aspect-library/
These aspects are a way of activating security features from JBoss AS to plain Java
classes, without necessity of using EJB. This means that you should configure the security
aspects either with annotations, or xdoclets, or even an xml file. In a few words, these
aspects forward security implementation to the same security components JBoss uses on EJB.
But, in your case, these components are already doing their work through your
configuration on jboss.xml file.
If you want to use these aspects for implementing security, you should move the security
configuration of your interest from jboss.xml file to one of the configuration input
formats accepted by security aspects. On the other hand, if you want to keep things as is,
you still can use the SecurityContext class as a utility. In this case, you will need to
initialize its domain field, so you can make it useful for you. But remember of doing so
only if your application is not using security aspects.
All this said, I think that the most straightforward and simple solution for you is to cut
the security functional code you already have on your slsbs, and paste this code in one or
more aspects of yours.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011459#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...