Alexey S [
http://community.jboss.org/people/ashirman] created the discussion
"how to use JBoss AOP with portlets"
To view the discussion, visit:
http://community.jboss.org/message/555689#555689
--------------------------------------------------------------
Hello everyone,
probably my question is very stiuped but I'm just start studying JBoss AOP....
So, I would like to use Jboss AOP together with Portlet (IPC). I have to use Jetspeed as
Apache server (it is not my mind - it is part of my task..)
Well I have created simple application where AOP stuff should be used every time when the
doView portlet's metod is called. The ANT compiles my project in Ecllipce without any
error ant it can be deployed on Jetspeed. But... I have not got any results from AOP. It
looks like AOP's functions do not call at all.
Source code below:
public class AOPTestAspect {
public Object run(MethodInvocation invocation) throws Throwable {
try
{
System.out.println("Hello from Aspect");
return invocation.invokeNext();
}
finally
{
}
}
}
public class IPCEAOPPortlet extends javax.portlet.GenericPortlet
{
public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse
response)
throws javax.portlet.PortletException, java.io.IOException
{
response.setContentType("text/html");
response.getWriter().println("Hello world!");
}
}
jboss-aop looks like
<aop>
<aspect/>class="AOPTestAspect<aspect>
<bind pointcut="execution(void IPCEAOPPortlet->doView(..))">
<around aspect="aoptest.AOPTestAspect"
name="run"></around>
</bind>
</aop>
Could anybody to explane me where I maek a misprints?
Probably there is a clear explanation in docs or are there examples of AOP's using
with portlets?
Thanks a lot,
Alexey
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/555689#555689]
Start a new discussion in JBoss AOP Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]