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

    Ideas for Local Variable Annotations?

    Bill Burke Master

      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?
          Corby Page Newbie

          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 );
          }