4 Replies Latest reply on Feb 18, 2014 10:47 PM by msnaidu

    Is there any way to check whether Wildfly is started in WebProfile/Full Platform mode?

    msnaidu

      Generally if we execute ./bin/standalone.sh, it refers to  standalone\configuration\standalone.xml and starts the server in WebProfile mode.

       

      Even we can execute ./bin/standalone.sh -c standalone-full.xml for running in Full platform mode.

       

      But is there a way to check whether server is started in WebProfile/Full platform mode in log files?

       

      Does it logs  in which mode it has started in any log files?

       

      Regards,

      Naidu

        • 1. Re: Is there any way to check whether Wildfly is started in WebProfile/Full Platform mode?
          brian.stansberry

          No, the configuration file name isn't reliably logged.

           

          It's unreliably logged in the server log if 1) Oracle JDK 7 is used (perhaps others do something similar) and 2) you don't use the default config file and instead use the -c switch on the command line. Then you get a full dump of system properties at DEBUG, including:

           

          sun.java.command = /Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/wildfly-8.0.1.Final-SNAPSHOT/jboss-modules.jar -mp /Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/wildfly-8.0.1.Final-SNAPSHOT/modules org.jboss.as.standalone -Djboss.home.dir=/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/wildfly-8.0.1.Final-SNAPSHOT -Djboss.server.base.dir=/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/wildfly-8.0.1.Final-SNAPSHOT/standalone -c standalone-full.xml

           

          You can get better information through the CLI:

           

          [standalone@localhost:9990 /] /core-service=server-environment:read-attribute(name=config-file)

          {

              "outcome" => "success",

              "result" => "/home/brian/dev/jbossas/jboss-as/build/target/wildfly-8.0.1.Final-SNAPSHOT/standalone/configuration/standalone-full.xml"

          }

           

          Please note though that "Web Profile" and "Full Profile" aren't formal concepts in the software and looking at the config file name only provides a rough estimate as to whether a config supports a particular EE profile. We ship some config files people can use and we certify EE full and web profile compliance. But people can take our standard config files and alter them as they see fit, create something complete different from what we certified with, and still call the file standalone-full.xml.

          1 of 1 people found this helpful
          • 2. Re: Is there any way to check whether Wildfly is started in WebProfile/Full Platform mode?
            ctomc

            Mostly you would see in logs that some extra subsystems are being started, subsystems as such would be messaging & jacorb.

             

            you can also customize configuration to only include subsystems you need, that way you don't need to worry about what config you are running.

             

            There is also one other option, but this is highly internal implementation detail and can change at any point in future.

             

            you could look up system property "jboss.server.default.config" that will hold name of the configuration file server was started with, but again, that is internal impl so use it with caution.

            • 3. Re: Is there any way to check whether Wildfly is started in WebProfile/Full Platform mode?
              brian.stansberry

              The jboss.server.default.config system property is used to set the default config file to use if the -c / --server-config switch isn't used. It doesn't hold the name of the config file actually used.

               

              The idea is you can set -Djboss.server.default.config=standalone-full-ha.xml in standalone.conf once and then save yourself typing -c standalone-full-ha.xml every time you start the server.

              • 4. Re: Is there any way to check whether Wildfly is started in WebProfile/Full Platform mode?
                msnaidu

                Thank you for the information