Re: [aspectwerkz-user] AOP advice execution sequence
akhilesh laddha <[email protected]> Wed, 21 Nov 2007 19:12:00 -0800 (PST)
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
--0-808432745-1195701120=:33669
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Alex,
I would like to know, what would be the right approach to bring the parallel execution of advice functionality up in the solution.
Should I tweak the framework code or own solution (means create a thread in advice and execute localize concerns code in run method)?
Code snippet to add in own solution---
MyAdvice()
{
MyConcerns concerns = MyConcerns ();
new Thread(concerns).start();
}
------------------
Class MyConcerns ()
{
public void run()
{
System.out.println("Log info");
}
}
-----------------------------------
Note - If we need to tweak in the framework code then where I need to do. Please do let me know.
Thanks
Akhilesh
Alexandre Vasseur <[email protected]> wrote:
yes you can code for that, but the AOP framework won't create any thread for you
those papers are about use case, and not about framework features
On 11/21/07, akhilesh laddha wrote:
>
> Alex,
> I have some doubt. Because, attached document section 5, 6 and 7 describes
> that AOP advice run in parallel with the application code.
>
> In this url
> http://www.sdtimes.com/editorial/opinion-20020101-01.html
> article explain in the same line.
>
> Still, my understanding is not clarified, because your reply defer from the
> article.
>
> Is that all Java AOP framework inherently not support parallel execution of
> advice with the application code?
>
> Please let me know.
>
> Thanks
> Akhilesh
> Alexandre Vasseur wrote:
> no it runs in the same code path - as if you wrote it
> this said it is easy to have your advice produce an async task that
> will be consumed by some thread queue if you want
> it is all up to you
> Alex
>
> On Nov 20, 2007 6:00 PM, akhilesh laddha wrote:
> >
> > Hi All,
> > I would like to get clarify my self about AOP advice execution sequence
> > along with the application code. Does AOP advice execute in parallel with
> > application methods for that cross cut defines?
> >
> > For example
> > Application method - foo() (for cross cut define)
> > Takes execution time T1
> > Advice fooAdvice() takes t1 time
> >
> > If AOP advice runs sequentially with application code then additional
> > performance hit because of advice code execution.
> >
> > Total time will be T1 +t1
> >
> > From my understanding it runs in parallel therefore it takes time equal to
> > whichever is higher for ex T1
> >
> > Please correct my understanding
> >
> > Thanks
> > Akhilesh
> >
> >
> >
> > ________________________________
> > Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try
> it
> > now.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
> ________________________________
> Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it
> now.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------
Never miss a thing. Make Yahoo your homepage.
--0-808432745-1195701120=:33669
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Alex,</SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I would like to know, what would be the right approach to bring the parallel execution of advice functionality up in the solution. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Should I tweak the framework code or own solution (means create a thread in advice and execute localize concerns code in run method)?<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Code snippet to add in own solution---<o:p></o:p></SPAN></div> <div><SPAN s
tyle="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">MyAdvice() <o:p></o:p></SPAN></div> <div><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> MyConcerns concerns = MyConcerns ();<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> new Thread(concerns).start();<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">} <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">------------------<o:p></o:p></SPAN></div> <div><SP
AN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Class MyConcerns ()<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></div> <div><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> public void run()<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: DE">{<o:p></o:p></SPAN></div> <div><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: DE"> System.out.println("Log info");<o:p></o:p></SPAN></div> <div><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: DE"> </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN sty
le="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-----------------------------------<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div>
<div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Note - If we need to tweak in the framework code then where I need to do. Please do let me know.<o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks<BR>Akhilesh<o:p></o:p></SPAN></div> <div><BR><B><I>Alexandre Vasseur <[email protected]></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">yes you can code for that, but the AOP framework won't create any thread for you<BR>those papers are about use case, and not about framework features<BR><BR><BR>On 11/21/07, akhilesh laddha <[email protected]>wrote:<BR>><BR>> Alex,<BR>>
I have some doubt. Because, attached document section 5, 6 and 7 describes<BR>> that AOP advice run in parallel with the application code.<BR>><BR>> In this url<BR>>
http://www.sdtimes.com/editorial/opinion-20020101-01.html<BR>> article explain in the same line.<BR>><BR>> Still, my understanding is not clarified, because your reply defer from the<BR>> article.<BR>><BR>> Is that all Java AOP framework inherently not support parallel execution of<BR>> advice with the application code?<BR>><BR>> Please let me know.<BR>><BR>> Thanks<BR>> Akhilesh<BR>> Alexandre Vasseur <[email protected]>wrote:<BR>> no it runs in the same code path - as if you wrote it<BR>> this said it is easy to have your advice produce an async task that<BR>> will be consumed by some thread queue if you want<BR>> it is all up to you<BR>> Alex<BR>><BR>> On Nov 20, 2007 6:00 PM, akhilesh laddha wrote:<BR>> ><BR>> >
Hi All,<BR>> > I would like to get clarify my self about AOP advice execution sequence<BR>> > along with the application code. Does AOP advice execute in parallel with<BR>>
> application methods for that cross cut defines?<BR>> ><BR>> > For example<BR>> > Application method - foo() (for cross cut define)<BR>> > Takes execution time T1<BR>> > Advice fooAdvice() takes t1 time<BR>> ><BR>> > If AOP advice runs sequentially with application code then additional<BR>> > performance hit because of advice code execution.<BR>> ><BR>> > Total time will be T1 +t1<BR>> ><BR>> > From my understanding it runs in parallel therefore it takes time equal to<BR>> > whichever is higher for ex T1<BR>> ><BR>> > Please correct my understanding<BR>> ><BR>> > Thanks<BR>> > Akhilesh<BR>> ><BR>> ><BR>> ><BR>> > ________________________________<BR>
> > Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try<BR>> it<BR>> > now.<BR>><BR>>
---------------------------------------------------------------------<BR>> To unsubscribe from this list please visit:<BR>><BR>> http://xircles.codehaus.org/manage_email<BR>><BR>><BR>><BR>><BR>> ________________________________<BR>> Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it<BR>> now.<BR>><BR>><BR>> ---------------------------------------------------------------------<BR>> To unsubscribe from this list please visit:<BR>><BR>> http://xircles.codehaus.org/manage_email<BR>><BR>><BR><BR>---------------------------------------------------------------------<BR>To unsubscribe from this list please visit:<BR><BR>http://xircles.codehaus.org/manage_email<BR><BR></BLOCKQUOTE><BR><p> 
<hr size=1>Never miss a thing. <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a>
--0-808432745-1195701120=:33669--