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 <[email protected]> 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 > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > >
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
