1 Reply Latest reply on Nov 11, 2013 5:11 PM by jensaug

    Can i add/remove modules using JBoss CLI in Jboss AS 7.1.1

    manoj.m.agarwal

      When i am trying to add a module using below CLI command, i get module add as Unexpected command. Is adding/removing modules using CLI in AS 7.1.1 permitted ?

       

      [standalone@localhost:9999 /] module add --name=org.datacom --resources=\RND_WRK\jars\cadcjdbc-14.00.007.jar

      Unexpected command 'module add --name=org.datacom --resources=\RND_WRK\jars\cadcjdbc-14.00.007.jar'. Type 'help --commands' for the list of supported command

      s.

       

       

      I tried to see supported commands using 'help --commands'  but i dint see module add in the list -

       

      [standalone@localhost:9999 /] help --commands

      Commands available in the current context:

      batch             cd                clear             command           connect           data-source       deploy            deployment-info

      echo-dmr          help              history           ls                pwd               quit              read-attribute    read-operation

      undeploy          version           xa-data-source

      To read a description of a specific command execute 'command_name --help'.

      [standalone@localhost:9999 /] module --help

      Unexpected command 'module --help'. Type 'help --commands' for the list of supported commands.

        • 1. Re: Can i add/remove modules using JBoss CLI in Jboss AS 7.1.1
          jensaug

          Manoj,

           

          Short answer: No.

           

          There is no 'module' command in 7.1.1.Final. To handle modules in runtime, you can add a /META-INF/jboss-deployment-structure.xml file with a module element, something like this:

           

          <jboss-deployment-structure>

              <module name="deployment.org.datacom" slot="main" >

                  <resources>

                      <resource-root path="."/>

                  </resources>

              </module>

          </jboss-deployment-structure>

           

          This way you can handle slot/versions of your 'module', dependencies, exports etc. But depending on what you want to achieve - any deployment can be referenced using a module-alike dependency, so you can also simply deploy your archive 'datacom-1.0.SNAPSHOT.jar' and create depdendencies to 'deployment.datacom-1.0.SNAPSHOT.jar'

           

          However, you'll find the module command in later versions, like 7.1.3.Final and 7.2.0.Final

           

          br,

          Jens