Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Around advice not being executed
Around advice not being executed [message #53611] Tue, 14 June 2005 00:33 Go to next message
Eclipse UserFriend
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 #53637 is a reply to message #53611] Tue, 14 June 2005 06:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ozkologlu.nowhere.com

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 #53663 is a reply to message #53637] Tue, 14 June 2005 14:58 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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 #53687 is a reply to message #53663] Wed, 15 June 2005 01:28 Go to previous message
Eclipse UserFriend
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 06:36 Go to previous message
Oz Kologlu is currently offline Oz KologluFriend
Messages: 5
Registered: July 2009
Junior Member
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 14:58 Go to previous message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
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] Wed, 15 June 2005 01:28 Go to previous message
Oz Kologlu is currently offline Oz KologluFriend
Messages: 5
Registered: July 2009
Junior Member
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
Previous Topic:Around advice not being executed
Next Topic:AJDT development build for Eclipse 3.1RC2
Goto Forum:
  


Current Time: Wed Apr 24 18:30:40 GMT 2024

Powered by FUDForum. Page generated in 0.03168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top