2 Replies Latest reply on Nov 27, 2014 7:27 AM by valsaraj007

    Migrating SystemPropertiesService to JBoss AS 7

    valsaraj007

      Hi,

      We are migrating from older JBoss to JBoss 7.1. We are using SystemPropertiesService and it is done in JBoss 7 as given blow:

       

      JBoss AS 6:

      <mbean code="org.jboss.varia.property.SystemPropertiesService"

        name="jboss.security:service=AppSystemProperties">

        <attribute name="Properties">

        org.app.password.KeyStore=file:/appdev-app.jks

        org.app.password.KeyStoreType=jks

        org.app.PasswordStore=file:/passwordStore.properties

        org.app.ssl.keyStorePasswordId=jboss

        org.app.ssl.keyStore=appdev-jboss.jks

        org.app.ssl.keyStoreType=jks

        org.app.ssl.trustStore=appdev-jboss-cacerts.jks

        org.app.ssl.trustStoreType=jks

        </attribute>

        </mbean>

       

      JBoss AS 7:

      <system-properties>

        <property name="org.app.password.KeyStore" value="file:/appdev-app.jks"/>

        <property name="org.app.password.KeyStoreType" value="jks"/>

        <property name="org.app.PasswordStore" value="file:/passwordStore.properties"/>

        <property name="org.app.ssl.keyStorePasswordId" value="jboss"/>

        <property name="org.app.ssl.keyStore" value="appdev-jboss.jks"/>

        <property name="org.app.ssl.keyStoreType" value="jks"/>

        <property name="org.app.ssl.trustStore" value="appdev-jboss-cacerts.jks"/>

        <property name="org.app.ssl.trustStoreType" value="jks"/>

        </system-properties>

       

      Is this correct method to do this?

        • 1. Re: Migrating SystemPropertiesService to JBoss AS 7
          jaysensharma

          "SystemPropertiesService" is not available in JBossAS7. So yes, You can define the system properties using the <system-properties> tag or by using the "-P" option while starting your standalone instances:

           

          ./standalone.sh -P /PATH/TO/YoutPropertiesFile.properties
          
          
          

           

          In domain mode you can define it at the server as well as at the server-group level. You can add "boot-time" attribute there which indicates whether or not this property will be set at boot-time.

           

          
          
          [domain@localhost:9999 /] /server-group=main-server-group/system-property=aaa:add(value="bbb",boot-time=true)
          OR
          
          [domain@localhost:9999 /] /host=master/server-config=server-one/system-property=ccc:add(value="ddd",boot-time=true)
          
          • 2. Re: Migrating SystemPropertiesService to JBoss AS 7
            valsaraj007

            Thanks