Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10851

Enable CDI by default when MP Config usage is detected in the deployment

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • MP Config
    • None

    Description

      Enable CDI by default when MP Config usage is detected in the deployment.

      Currently users are forced to add empty beans.xml to the deployment every time they want to use MP Config - e.g. in simple servlet scenario

      @WebServlet("/")
      public class HelloServlet extends HttpServlet {
          @Inject
          @ConfigProperty(name = "port_number")
          Integer port;
      
          @Override
          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
              resp.getWriter().println("Value of port: " + port);
          }
      }
      

      MP Config without CDI makes no sense to me. MP Config subsystem should be able to ensure CDI is enabled. CCing manovotn brian.stansberry

      Attachments

        Issue Links

          Activity

            People

              jmesnil1@redhat.com Jeff Mesnil
              rsvoboda@redhat.com Rostislav Svoboda
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: