Hi,
Thanks for your information. I used "around" instead of "before " to
return a value. It works fine. Thank you.
On Fri, Feb 7, 2014 at 1:18 PM, Alexander Kriegisch <
[email protected]> wrote:
> No. Just use around() instead.
>
> --
> Alexander Kriegisch
> http://scrum-master.de
>
>
> Am 07.02.2014 um 02:52 schrieb Shanmuga Priya R <
> [email protected]>:
>
> Hi,
> Is there is a possiblity return a value in Advice-"before". If
> possible please help me.
>
> *My code snippet:(JAVA)*
> public class ServiceSelection
> {
> public String invokeService(String servicetype) throws AxisFault
> {
> if(servicetype.equals("A"))
> return "A";
> else if(servicetype.equals("B"))
> return "B";
> else
> return "C";
> }
> }
>
> *Aspect*
>
> pointcut beforeaspect(String servicetype):execution(*
> *.ServiceSelection(String)) && args(servicetype);
>
> beforeString servicetype():beforeaspect(servicetype)
> {
> return "A";
> }
>
>
> *Based on the return value of aspect the if-else comparison needs to
> be execute. Is it possible in aspectj..*
>
> *That is before the exe of *ServiceSelection() aspect needs to wriiteen a
> value.. Based on that value ServiceSelection() ll be execute.
>
>
> Thanks,
>
> _______________________________________________
> 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
>
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users