The Spring Aspect Container in AWare will make it possible to manage your aspects using Spring, it let's you treat the aspects just as any other Spring bean.

The container will read in a Spring configuration file called aware-config.xml, this file has to be on your classpath. In this file you can define your aspects, add parameters and data structures to them, pass in references to other components that is being used etc. This is for example documented briefly in the Role-Based Security section. For details see the Spring documentation.


To tell the AspectWerkz system that you want to deploy a specific aspect in the Spring aspect container (or any other custom aspect container) you have to specifify that in the regular aspect definition file like this:

<aspect class="foo.bar.Baz" container="org.codehaus.aware.container.SpringAspectContainer">

In the aware-config.xml file you have to configure the aspects like this:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <bean id="my.own.Aspect"
        <property name="someProperty">

Some explanations:

For an example on how to configure aspect using Spring see the Role-Based Security component.