XMLWordPrintable

Details

    • Sub-task
    • Resolution: Unresolved
    • Major
    • 3.x Future
    • 2.12.1.Final
    • Java EE
    • None

    Description

      It would be good to have a command to add a CDI producer field to an existing class. A simple command such as :

      cdi-add-producer-field --named em --type javax.persistence.EntityManager
      

      Would generate :

      public class DatabaseProducer
      {
      
         @Produces
         private EntityManager em;
      }
      

      Then, we can have more attributes :

      cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifiers Production CustomerDB --alternative=true  --scoped Request --withNamed=true
      
      public class DatabaseProducer
      {
      
         @Produces 
         @Production
         @CustomerDB
         @Alternative
         @RequestScoped
         @Named
         private EntityManager em;
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: