1 Reply Latest reply on Sep 21, 2004 10:24 AM by cepage

    Ideas for Local Variable Annotations?

    bill.burke

      I'm looking for some use cases for our pointcut language supporting local variable annotations. Anybody have any ideas?

      Bill

        • 1. Re: Ideas for Local Variable Annotations?
          cepage

          How about per-method injection? I create a DAO where different methods need to reference different back-end systems.

          public void persistOldContract( Contract c )
          {
           @Injected(LEGACY_BACKEND) ContractPersistManager cpm;
           cpm.save( c );
          }
          
          public void persistRecentContract( Contract c )
          {
           @Injected(NEWER_BACKEND) ContractPersistManager cpm;
           cpm.save( c );
          }