0 Replies Latest reply on May 8, 2013 9:33 AM by michael.golubev

    How do you specify the context root for web applications deployed to JBoss 6+?

    michael.golubev

      Hello,

       

      [I'm responsible for JBoss integration for Intellij IDEA, this question is related to http://youtrack.jetbrains.com/issue/IDEA-95791].

       

      We are experiencing certain difficulties trying to override application context root during deploy with the administration interface of JBoss AS.

      As the administration interface we are using JBoss JMX API (for JBoss 6 and earlier) and Native Management API (for JBoss 7 and later).


      I have found that JMX deployer (jboss.system:service=MainDeployer) has apparently suitable "deploy" operation:
      - for JBoss 6.0.0.M1 and earlier MainDeployer has "public void deploy(DeploymentInfo deployment)" JMX operation in which DeploymentInfo class has proper "public String webContext" field;
      - for JBoss 6.0.0.Final and later (prior to version 7) MainDeployer has deprecated "public void deploy(Deployment deployment)" JMX operation in which Deployment interface has proper "String getSimpleName()" method which is used in VFSStructureBuilder to determine application context;

      But I don't see a way to construct and pass the correct parameter objects (DeploymentInfo and Deployment) to the MainDeployer MBean.

       

       

      For JBoss 7 and later I have found no way to override application context root using Native Management API.

       

      So, regarding above, I have next questions:
      1) Are mentioned JMX operations suitable for application context root overriding?

      2) If operations are suitable, how exactly should I construct their respected parameter objects? (If not - is there any other way to override context root with JBoss JMX API?)

       

      Thanks,

      Regards,

      Michael