3 Replies Latest reply on May 1, 2012 11:42 AM by peterj

    How to add Java system properties to JBoss startup script?

    shoefiend

      Hi,

       

      I am using JBoss 4.2.0 on AIX 6.1.

       

      My startup script is as follows:

       

      #!/bin/sh

      USER_MEM_ARGS="-Xms256m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=256m -Xss256k

      -XX:+DisableExplicitGC"

      export USER_MEM_ARGS

      /u01/documentum/shared/jboss4.2.0/bin/run.sh -c DctmServer_MethodServer -b 0.0.0

      .0 $JAVA_OPTIONS

       

      As part of implementing Kerberos authentication I need to add the following system properties to my JBoss start up script.

       

      -Djava.security.krb5.conf=/disk01/kerb/krb5.conf

      -Djavax.security.auth.useSubjectCredsOnly=false

       

      How do I add these 2 system properties to the startup script?

       

      Thanks!

        • 1. Re: How to add Java system properties to JBoss startup script?
          peterj

          You must have modified run.sh because the run.sh and run.conf files shipped with JBoss AS 4.2.0 do not use that environment variable.

           

          Usually, to add system properties, you edit run.conf and add another line to set JAVA_OPTS, or add them to and existing JAVA_OPTS line.

          • 2. Re: How to add Java system properties to JBoss startup script?
            shoefiend

            The Kerberos set up documemnt states that these 2 Java System properties lines need to be added to the Application Server's start up script.

             

            But you say I must modify run.conf and not the startup.sh file?

             

            I found 4 run.conf files:

            ../jboss4.2.0/bin/run.conf

            ../jboss4.2.0/server/DctmServer_MethodServer/run.conf
            ../jboss4.2.0/server/clustertemplate/run.conf

            ../jboss4.2.0/server/template/run.conf

             

            Which of these should I add the JAVA_OPTS line to?

             

            Thanks!

            • 3. Re: How to add Java system properties to JBoss startup script?
              peterj

              You are going to have to ask the person that you got this setup from. In the offical JBoss AS 4.2.0 release there is only one run.conf file - in the bin directory. The three directories you mentioned under jboss4.2.0/server do not exist in Jboss AS 4.2.0 as released.