2 Replies Latest reply on Oct 22, 2012 1:12 AM by shambhushikari

    Disabling Resteasy for Specific Applications... NOT for all apps

    shambhushikari

      I have been reading few post that talk about disabling RestEasy by removing the jaxrs references from configuration i.e.

      1. <JBoss_AS_7_Home>/standalone/configuration/standalone.xml
      2. <JBoss_AS_7_Home>/domain/configuration/domain.xml

      I think this way we are completely disabling RestEasy from JBoss, Is there any way to selectively disable this modules? e.g. If I have legacy app for which does not use RestEasy I will disable RestEasy, but for another application, I may still want to use RestEasy. Will JBoss offers that flexibility?

        • 1. Re: Disabling Resteasy for Specific Applications... NOT for all apps
          ctomc

          Hi,

           

          read bit about classloading in AS7 here https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7

           

          but what you are looking for is something like this

           

              <deployment>

               <exclude-subsystems>

                  <subsystem name="resteasy" />

              </exclude-subsystems>

              </deployment>

           

          --

          tomaz

          • 2. Re: Disabling Resteasy for Specific Applications... NOT for all apps
            shambhushikari

            Tomaz,

             

            Thanks for the reply, I tried doing this but the issue is that resteasy gets loaded as part of app server startup and the metro jars conflicts with loaded endpoints. Following is the error that gets printed

            Is there any way to have a server profile for which I can disable resteasy? This way I can run my old app in one profile and new resteasy app in another profile in same app server? Ofcourse these profiles will start at same time. Same questions in another words... can I have two <profile> blocks in standalone config xml?

             

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]

                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]

            Caused by: java.lang.IllegalArgumentException: JBAS015533: Web Service endpoint com.sun.xml.ws.tx.webservice.member.coord.ActivationRequesterPortTypeImpl with URL pattern /Coordinator is already registered. Web service endpoint com.sun.xml.ws.tx.webservice.member.coord.RegistrationRequesterPortTypeImpl is requesting the same URL pattern.

                      at org.jboss.as.webservices.metadata.model.AbstractDeployment.addEndpoint(AbstractDeployment.java:60)

                      at org.jboss.as.webservices.metadata.model.JAXWSDeployment.addEndpoint(JAXWSDeployment.java:27)

                      at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXWS_POJO.processAnnotation(WSIntegrationProcessorJAXWS_POJO.java:94)

                      at org.jboss.as.webservices.deployers.AbstractIntegrationProcessorJAXWS.deploy(AbstractIntegrationProcessorJAXWS.java:87)

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                      ... 5 more

             

             

            PS: My app usage Metro and collides with already loaded RestEasy Jars.