I can't help but shudder at how few classes you wrap might actually be
prepared to deal with this kind of voodoo.  IMHO, uses of AOP should
focused on cross cutting concerns like transactional processing and
logging, not changing the fundamental processing flow of the underlying
application.  Otherwise, how in the world are you going to be able to write
tests and believe in your coverage metrics?

Craig McClanahan

On Tue, Jun 5, 2012 at 2:48 PM, Bob Lee <[email protected]> wrote:

> Yep, that should work.
>
> Bob
>
>
> On Tue, Jun 5, 2012 at 1:54 PM, JavaPlayer <[email protected]> wrote:
>
>> I would like to create a retry mechanism with Guice AOP. I wanted to know
>> if it's legal to call proceed() multiple time in the same
>> invoke(MethodInvocation invocation). Otherwise, is there a better way to
>> implement a retry mechanism on many different method in my application.
>>
>>
>> I would like to do something like:
>>
>> public Object invoke(MethodInvocation invocation) throws Throwable {
>>              boolean success = false;
>>               while(!success){
>>               try{
>> invocation.proceed();
>>                 success = true;
>>               catch(MyCustomException e){
>>                   success = false;
>>               }
>>         }
>>
>> }
>>
>> Thank you
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "google-guice" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-guice/-/2wf2SoWqvzAJ.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-guice?hl=en.
>>
>
>
>
> --
> Bob
> Square is hiring! <https://squareup.com/jobs>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to