7 Replies Latest reply on Feb 2, 2017 8:46 AM by ahoffer

    Jboss cli problem - adding global-module

    igalp

      I'm trying to add global-module using the jboss cli or the modelNode

       

      The required xml should look like this:

       

      <subsystem xmlns="urn:jboss:domain:ee:1.0">

             <global-modules>

                <module name="org.apache.log4j" slot="main"/>

              </global-modules>

          </subsystem>

       

      when I tried to do it according to the jboss cli  it doesn't work.

      I'm not sure how should I refer  the <global-module> in the cli.

       

      following are two failures tries:

       

      [standalone@localhost:9999 /] /subsystem=ee/global-modules:add(module="org.apache.log4",slot="main")

      Node path format is wrong around 'global-modules' (index=14).

       

      [standalone@localhost:9999 /] /subsystem=ee/module=org.apache.log4:add(slot="main")

      Failed to get the list of the operation properties: "JBAS014739: No handler for read-operation-description at address [    ("subsystem" => "ee"),

       

       

      Any suggestion ???

        • 1. Re: Jboss cli problem - adding global-module
          jaysensharma

          Hi

           

           

          [standalone@localhost:9999 /] /subsystem=ee:write-attribute(name="global-modules",value=[{"name" => "middleware.magic.com","slot" => "main"}])

          {"outcome" => "success"}

           

                  <subsystem xmlns="urn:jboss:domain:ee:1.1">

                      <global-modules>

                          <module name="middleware.magic.com" slot="main"/>

                      </global-modules>

                      <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>

                      <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>

                  </subsystem>

          • 2. Re: Jboss cli problem - adding global-module
            igalp

            Hi  Jay,

             

            thanks for the quick answer.

             

            I already saw this possiblity - the problem is that I cant add another global-module - but just override the current definition.

            - Do you know how can I add a global-module using the add operation ?

            - do you how can I convert this write-attribute cli to java api - using the ModelNode object ?

             

             

            thanks,

            Yigal

            • 3. Re: Jboss cli problem - adding global-module
              jaysensharma

              It looks liem a Bug

              • 4. Re: Jboss cli problem - adding global-module
                nickarls

                Hmm. Not sure, I just can't think of the correct CLI syntax for adding sub-elements like that right now :-/

                • 5. Re: Jboss cli problem - adding global-module
                  ssilvert

                  igal pinhasi wrote:

                   

                  I already saw this possiblity - the problem is that I cant add another global-module - but just override the current definition.

                  - Do you know how can I add a global-module using the add operation ?

                  - do you how can I convert this write-attribute cli to java api - using the ModelNode object ?

                  You can add another module with write-attribute, but you have to re-write the entire list.  This is a common problem with list attributes.  Sometimes list-management operations are provided by the subsystem author and sometimes they are not.  I think this is being addressed though.

                   

                  /subsystem=ee/:write-attribute(name=global-modules,value=[{"name" => "middleware.magic.com","slot" => "main"},{"name" => "fooware.magic.com","slot" => "foo"}])
                  {"outcome" => "success"}
                  

                   

                  Stan

                  2 of 2 people found this helpful
                  • 6. Re: Jboss cli problem - adding global-module
                    armahdi

                    has this been addressed. i tried to do the same and it over wrote my whole list of global modules.

                    • 7. Re: Jboss cli problem - adding global-module
                      ahoffer

                      You should be able to add to the list of global modules using the "list-add" operation.

                       

                      /subsystem=ee:list-add(name=global-modules,value={name=middleware.magic.com})

                       

                      Correction: Apologies, the list-add operation isn't available in AS7, but in WildFly.