XMLWordPrintable

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

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

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

              Created:
              Updated: