2 Replies Latest reply on Jan 27, 2014 10:19 AM by asotobu

    Arquillian-Undertow-Extension - ShrinkWrap Question

    asotobu

      Hello, maybe I should move this topic on ShrinkWrap forum, but I think this is the right place to ask because involves Arquillian too.

       

      I am developing a container extension for undertow. Currently I am developing the ShrinkWrap part and I have got some questions about how to develop it:

       

      For example in undertow you need to register a servlet by calling something like:

       

      .addServlets(servlet("MessageServlet", MessageServlet.class) .addInitParam("message", "Hello World") .addMapping("/*")


      so apart from servlet class you also need to provide a name, init parameters, mapping, ... So it seems I need something more complex than WebArchive (or not IDK).

       

      So in my opinion there are two possible solutions:

       

      The first one use WebArchive and detect Servlet classes, when one Servlet class is detected then we can get that information (servletName and mapping) from Servlet class. I don't like this approach because we are cutting  the way how undertow configures servlets.

       

      The other approach is creating a UndertowArchive which allow you to add all required information. The problem is that there are a lot of overridden methods  that has not sense.

       

      Do you have any suggestion of how to attack this problem or any other plausible solution?

       

      Thank you so much.