Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Validation of AOP metrics

Hi  ALL !! 

Greetings, 

Please I want to know  from your expert advice, &  your suggestion on " What is validation of AOP metrics w.r.t OOP metrics".

Thanking You,

S Kotrappa


On Thu, Aug 22, 2013 at 9:30 PM, <aspectj-users-request@xxxxxxxxxxx> wrote:
Send aspectj-users mailing list submissions to
        aspectj-users@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://dev.eclipse.org/mailman/listinfo/aspectj-users
or, via email, send a message with subject or body 'help' to
        aspectj-users-request@xxxxxxxxxxx

You can reach the person managing the list at
        aspectj-users-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of aspectj-users digest..."


Today's Topics:

   1. Re: Around advice problem with java.io.InputStream (Sina)


----------------------------------------------------------------------

Message: 1
Date: Thu, 22 Aug 2013 17:05:12 +0430
From: Sina <sina.golesorkhi@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Around advice problem with
        java.io.InputStream
Message-ID: <430186BB-8F5D-4EF4-893A-D001B50FC795@xxxxxxxxx>
Content-Type: text/plain; charset="windows-1252"

Hi Andy,

thanks for the help. The problem was not with the advice but with the return value of methodExecution in my ExceptionHandler Aspect.
(I'd forgotten that the print method needed a different return value other than usual methods on the client side in order to process the response. Unfortunately I hadn't included that in my ExceptionHandler)

Btw thanks for the time.
Cheers,

Sina

On Aug 19, 2013, at 9:26 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:

> I presume a showWeaveInfo shows the advice is applying ok, and you are just saying the advice is not returning or it is returning null? Exception occuring in the advice?
>
> Sometimes I recommend switching to code style which has much better diagnostics - it may quickly indicate the problem to you which you can then choose to fix in the annotation style.
>
> cheers,
> Andy
>
>
> On 19 August 2013 05:15, Sina <sina.golesorkhi@xxxxxxxxx> wrote:
> Hi there,
>
> I'm using AspectJ along with Struts 2.x .
> In one of my action classes I have a private field of type java.io.InputStream which is used to sent back some data (generated by net.sf.jasperreports.engine.JasperRunManager.runReportToPdf method) to the client.
>
> When using the @Around advice (for exception handling manners) the inputstream is not sent back to the client in response, hence the PDF file is not generated.
>
>
> public class SomeAction {
>
>       ???
>       private InputStream inputStream;
>
>
>       public String print() {
>               ?.
>       setInputStream(net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(?.));
>
>       }
> }
>
>
> @Around("execution ??? ")
>       public String methodExecution(CustomAction action, ProceedingJoinPoint thisJoinPoint) throws Throwable {
>               try {
>                       thisJoinPoint.proceed();
>               } catch (Exception e) {
>                                       ?...
>               }
>
>
> The method is working properly with @Before but @Around.
> P.S. the aspect is working flawlessly and of course I've omitted the advice declaration for the sake of a clarity and abstraction here.
>
> Any idea?
>
> Cheers,
> Sina
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20130822/79964b16/attachment.html>

------------------------------

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


End of aspectj-users Digest, Vol 102, Issue 12
**********************************************



--
S Kotrappa
Associate Professor in CSE
B.E, M.S, M Tech(CSE),(Ph.D)
Principal, KLE's BCA/MCA, RLS Institute , Belgaum, India
Phone No.0831-2403774/75

Back to the top