Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gokepler/e9d3beadbf439bf005b7a8c5eb2da759 to your computer and use it in GitHub Desktop.

Select an option

Save gokepler/e9d3beadbf439bf005b7a8c5eb2da759 to your computer and use it in GitHub Desktop.

Revisions

  1. @rponte rponte revised this gist Aug 12, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AspectJProxyFactorySample.java
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    AspectJProxyFactory factory = new AspectJProxyFactory(service);
    factory.addAspect(myaspect);
    // factory.setProxyTargetClass(true); // if you're applying to a concrete class
    EstoqueMessageListener proxy = factory.getProxy();
    XuxuService proxy = factory.getProxy();

    // just run it
    proxy.execute();
  2. @rponte rponte revised this gist Aug 12, 2011. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AspectJProxyFactorySample.java
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,8 @@
    RetryAndNotifyOnErrorAspect myaspect = new RetryAndNotifyOnErrorAspect();

    AspectJProxyFactory factory = new AspectJProxyFactory(service);
    factory.addAspect(myaspect);
    factory.addAspect(myaspect);
    // factory.setProxyTargetClass(true); // if you're applying to a concrete class
    EstoqueMessageListener proxy = factory.getProxy();

    // just run it
  3. @rponte rponte created this gist Aug 11, 2011.
    9 changes: 9 additions & 0 deletions AspectJProxyFactorySample.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    XuxuService service = new XuxuServiceImpl();
    RetryAndNotifyOnErrorAspect myaspect = new RetryAndNotifyOnErrorAspect();

    AspectJProxyFactory factory = new AspectJProxyFactory(service);
    factory.addAspect(myaspect);
    EstoqueMessageListener proxy = factory.getProxy();

    // just run it
    proxy.execute();