Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
AWare
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h2>Overview</h2> <p>The <strong>Spring Aspect Container</strong> in AWare will make it possible to manage your aspects using <a href="http://www.springframework.org">Spring</a>, it let's you treat the aspects just as any other Spring bean.</p> <p>The container will read in a Spring configuration file called <code>aware-config.xml</code>, 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 <a class="confluence-link" href="/display/AWARE/Role-Based+Security" data-linked-resource-id="3015" data-linked-resource-type="page" data-linked-resource-default-alias="Role-Based Security" data-base-url="http://docs.codehaus.org">Role-Based Security</a> section. For details see the <a href="http://www.springframework.org/docs/reference/">Spring documentation</a>.</p> <h2>Definition</h2> <p>To tell the <a href="http://aspectwerkz.codehaus.org/">AspectWerkz</a> 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:</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <aspect class="foo.bar.Baz" container="org.codehaus.aware.container.SpringAspectContainer"> ... </aspect> </pre></td></tr></table> <p>In the <code>aware-config.xml</code> file you have to configure the aspects like this:</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="my.own.Aspect" class="my.own.Aspect" singleton="false" init-method="intialize"> <property name="someProperty"> ... </property> ... </bean> ... </beans> </pre></td></tr></table> <p>Some explanations:</p> <ul> <li><code>id</code> - specifies the name of the aspect if a custom name is define you that else use the class name of the aspect (which is the default name). Mandatory.</li> <li><code>class</code> - specifies the class name of the aspect. Mandatory.</li> <li><code>singleton</code> - specifies that the aspect will be instantiated using the prototype pattern, Mandatory and needed to be set to <code>false</code></li> <li><code>init-method</code> - the <code>init-method</code> is the method that you are using to initialize the aspect. This method will be called when all the properties have been set. Optional.</li> <li><code>property</code> - the metadata that you want to pass to the aspect (see the <a href="http://www.springframework.org">Spring</a> documentation for details on how how to define properties). Optional.</li> </ul> <p>For an example on how to configure aspect using Spring see the <a class="confluence-link" href="/display/AWARE/Role-Based+Security" data-linked-resource-id="3015" data-linked-resource-type="page" data-linked-resource-default-alias="Role-Based Security" data-base-url="http://docs.codehaus.org">Role-Based Security</a> component.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced