Around advice not being executed [message #53611] |
Mon, 13 June 2005 20:33  |
Eclipse User |
|
|
|
Originally posted by: ozkologlu.nowhere.com
Hi all,
I'm trying to get an around advice working in a J2EE application running
under orion app server.
It's a simple pointcut /anonymous advice. The cross reference, decorators in
the advised method are all showing everything is ok but the advice does not
execute. I've tried the same sort of scenario using pojo's and all is OK but
for some reason I get no joy running under Orion app server. Am I missing
something here?
I'm using eclipse 3.0 and ajdt 1.2 (latest build)
Aspect:
String around (Ident id, Container cont):
execution(* ServerBean.getData(Ident, Container))
&& args( id,cont ) {
System.out.println("Here we go.....");
return proceed( id, cont);
}
ServerBean:
public class ServerBean extends AbstractSessionBean implements SessionBean
public String getData( Ident id, Container cont ) throws EJBAppException
{
System.out.println("called getData");
return "Here is your data";
}
}
Thanks,
Oz
|
|
|
|
|
Re: Around advice not being executed [message #53687 is a reply to message #53663] |
Tue, 14 June 2005 21:28  |
Eclipse User |
|
|
|
Originally posted by: ozkologlu.nowhere.com
I only looked into it in more detail after I saw your earlier post - thanks
Barry. I hope it fixed!
"Barry Kaplan" <groups1@memelet.com> wrote in message
news:d8mrb1$t5e$1@news.eclipse.org...
> Oz Kologlu wrote:
>> I would hope someone adds a warning for projects that contain multiple
>> output paths when converting a java project to an AspectJ project! Damn
>> pain!
>
> I spent half a day tracking down the same problem after converting an
> existing project with multiple output paths. Not only does this cause
> problems converting cleanly, I depend on the multiple output paths to
> seperate test and production code.
>
> I'm pretty sure we discussed this here last week or so, and I thought I
> filed a bug but cannot find it, so....
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=99972
>
> -barry
|
|
|
Re: Around advice not being executed [message #588846 is a reply to message #53611] |
Tue, 14 June 2005 02:36  |
Eclipse User |
|
|
|
Found it...
It would appear that the AspectJ compiler does not honour the Java Builder's
output paths when there are multiple output paths. So the class files were
being output to a completely differnet location. I can't believe I've lost
so much time hunting down a problem that doesn't exist.
I would hope someone adds a warning for projects that contain multiple
output paths when converting a java project to an AspectJ project! Damn
pain!
Thanks.
Oz
"Oz Kologlu" <ozkologlu@nowhere.com> wrote in message
news:d8l8kl$52b$1@news.eclipse.org...
> Hi all,
>
> I'm trying to get an around advice working in a J2EE application running
> under orion app server.
>
> It's a simple pointcut /anonymous advice. The cross reference, decorators
> in the advised method are all showing everything is ok but the advice does
> not execute. I've tried the same sort of scenario using pojo's and all is
> OK but for some reason I get no joy running under Orion app server. Am I
> missing something here?
>
> I'm using eclipse 3.0 and ajdt 1.2 (latest build)
>
> Aspect:
> String around (Ident id, Container cont):
> execution(* ServerBean.getData(Ident, Container))
> && args( id,cont ) {
> System.out.println("Here we go.....");
> return proceed( id, cont);
> }
>
> ServerBean:
> public class ServerBean extends AbstractSessionBean implements SessionBean
> public String getData( Ident id, Container cont ) throws
> EJBAppException {
> System.out.println("called getData");
> return "Here is your data";
> }
> }
>
> Thanks,
> Oz
>
>
>
|
|
|
Re: Around advice not being executed [message #588855 is a reply to message #53637] |
Tue, 14 June 2005 10:58  |
Eclipse User |
|
|
|
Oz Kologlu wrote:
> I would hope someone adds a warning for projects that contain multiple
> output paths when converting a java project to an AspectJ project! Damn
> pain!
I spent half a day tracking down the same problem after converting an existing project with multiple output paths. Not only does this cause problems converting cleanly, I depend on the multiple output paths to seperate test and production code.
I'm pretty sure we discussed this here last week or so, and I thought I filed a bug but cannot find it, so.... https://bugs.eclipse.org/bugs/show_bug.cgi?id=99972
-barry
|
|
|
Re: Around advice not being executed [message #588865 is a reply to message #53663] |
Tue, 14 June 2005 21:28  |
Eclipse User |
|
|
|
I only looked into it in more detail after I saw your earlier post - thanks
Barry. I hope it fixed!
"Barry Kaplan" <groups1@memelet.com> wrote in message
news:d8mrb1$t5e$1@news.eclipse.org...
> Oz Kologlu wrote:
>> I would hope someone adds a warning for projects that contain multiple
>> output paths when converting a java project to an AspectJ project! Damn
>> pain!
>
> I spent half a day tracking down the same problem after converting an
> existing project with multiple output paths. Not only does this cause
> problems converting cleanly, I depend on the multiple output paths to
> seperate test and production code.
>
> I'm pretty sure we discussed this here last week or so, and I thought I
> filed a bug but cannot find it, so....
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=99972
>
> -barry
|
|
|
Powered by
FUDForum. Page generated in 0.05313 seconds