[jboss-user] [JBoss AOP] - How to work with aspects?

Myryan Dzhachvadze do-not-reply at jboss.com
Tue Apr 5 03:15:03 EDT 2011

Myryan Dzhachvadze [http://community.jboss.org/people/narayan812] created the discussion

"How to work with aspects?"

To view the discussion, visit: http://community.jboss.org/message/597731#597731


I am a little noob in Jboss AOP. I read a lot of manual and undestood that aspects in Jboss can be defined 
with xml or annotations. I prefer to use annotations. So, almost each articles told how to write aspect but 
I didn't find how to configure jboss to work wit it. I undestood that I can create for instance class like this:

@Aspect( scope = Scope.PER_VM )
public class LogControlAspect
    public static final Logger log = Logger.getLogger( "defgoLogger" );
    @Bind( pointcut = "execution(net.defgo.logger.impl.DiaryLoggerBean+ * *(..))" )
    public Object trace( Invocation invocation ) throws Throwable
        log.debug( "!!!! ENTER !!!!" );
        Object method = invocation.invokeNext();
        log.debug( "!!!! EXIT !!!!:" + method );
        return method;

but what should I do to force it work? I think it should be some lines in jboss configs but I can't find what exactly.
Coult you please tell how to work with aspects?

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110405/3887e924/attachment.html 

More information about the jboss-user mailing list