2 Replies Latest reply on Jul 11, 2016 4:51 AM by wdfink

    How to Add Run-time properties with Multiple domains in EAP 6.4.5

    sukeshpeddolla

      Hello,

       

      JBoss EAP 6.4.5.GA (AS 7.5.5.Final-redhat-3)

       

      We have a situation in our project, where we had to create multiple domain controllers with single JBoss installation on single linux host.

       

      We successfully created multiple domains and code deploy works fine too, but there are so many -DJboss properties we have to pass to the second domain when it startup.

       

      Second domain has it's own seconddomain.conf and seconddomain.sh. From JBOSS_HOME/bin, we run below command every time second domain being started.

       

      /apps/jboss/jboss-eap-6.4.0/bin/seconddomain.sh -Djboss-domain.base.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/ -Djboss.domain.config.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/configuration/ -Djboss.domain.data.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/data -Djboss.domain.log.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/log -Djboss.domain.temp.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/tmp -Djboss.domain.servers.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/servers --domain-config=domain.xml --host-config=host.xml

       

      I tried to add these to seconddmain.conf and seconddomain.sh and it didn't work out, is there any way we can add above parameters to JBoss configuration ..?

       

      Any thoughts ..?

        • 1. Re: How to Add Run-time properties with Multiple domains in EAP 6.4.5
          brian.stansberry

          Does your seconddomain.sh reference your seconddomain.conf? If it does you should be able to put the desired properties in seconddomain.conf.

           

          You should only need to set jboss.domain.base.dir; the other properties you are setting are all set to the default values they would have if you just set the one property.

           

          Perhaps your problem in a typo? It's "jboss.domain.base.dir" not "jboss-domain.base.dir". No '-', all '.'.

          • 2. Re: How to Add Run-time properties with Multiple domains in EAP 6.4.5
            wdfink

            From what I see you only need to set "-Djboss.domain.base.dir=/apps/jboss/jboss-eap-6.4.0/seconddomain/"  (correct the typo Brian already mentioned)

            no other property needed, also specifying --domain-config or --host-config is not necessary as you set the default.

             

            Other properties, for server-groups or server I would add as system-properties to the domain.xml or host.xml to have all in one place.