Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-650

RESTeasy does not allow multiple Applications in the same webapp

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.0.GA
    • Fix Version/s: 3.0-RC-1
    • Component/s: None
    • Labels:
      None

      Description

      According to the JAX-RS spec it should be possible to deploy a war with multiple application classes. While attempting to resolve AS7-3199 I noticed that RESTeasy stashes some stuff in the servlet context, which then gets mixed up between the different servlets:

      https://github.com/resteasy/Resteasy/blob/master/jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/server/servlet/ServletContainerDispatcher.java#L69

      To see the code I am using to run this: https://github.com/stuartwdouglas/jboss-as/compare/AS7-3199 . MultipleApplicationTestCase fails randomly, depending on the order that that application is initialised.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            bill.burke Bill Burke added a comment -

            I thought (and made the assumption) that you could have only one Application class.

            Show
            bill.burke Bill Burke added a comment - I thought (and made the assumption) that you could have only one Application class.
            Hide
            swd847 Stuart Douglas added a comment -

            I made the same assumption, but apparently GF supports more than one, and after reading the spec it does not actually say that you can only have one anywhere that I can see.

            AS7-3199 is marked as an EAP 6 product requirement, but I am not sure who made that decision and what it is based on.

            Show
            swd847 Stuart Douglas added a comment - I made the same assumption, but apparently GF supports more than one, and after reading the spec it does not actually say that you can only have one anywhere that I can see. AS7-3199 is marked as an EAP 6 product requirement, but I am not sure who made that decision and what it is based on.
            Hide
            ceefour Hendy Irawan added a comment -

            You can also compare with WebSphere 8.0, which supports multiple JAX-RS Applications as in JAX-RS 1.1 spec:

            http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Ftwbs_jaxrs_configjaxrs11method.html

            Show
            ceefour Hendy Irawan added a comment - You can also compare with WebSphere 8.0, which supports multiple JAX-RS Applications as in JAX-RS 1.1 spec: http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Ftwbs_jaxrs_configjaxrs11method.html
            Hide
            bill.burke Bill Burke added a comment -

            This will not be fixed in AS7.x Only AS8 and standalone JAX-RS.

            Show
            bill.burke Bill Burke added a comment - This will not be fixed in AS7.x Only AS8 and standalone JAX-RS.

              People

              • Assignee:
                bill.burke Bill Burke
                Reporter:
                swd847 Stuart Douglas
              • Votes:
                8 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development