Check out the "injboss" tutorial.Also check out this in doco:http://docs.jboss.org/aop/aspect-framework/reference/en/html/running.html#jboss