Apparentely this seems a silly question, however at a job interview you might be surprised to hear the question: "How do you find out the JBoss version you are running ?" (Provided that you don't have access to the server logs).

As far as it concerns WildFly, well, it's accessible both from the Web Console and the Command Line Interface. On the Web console, you can find it out at the following link: http://localhost:9990/console/index.html#standalone-server :

   find out jboss wildfly version

When using the Command Line, you can retrieve the exact version through the product-info command:

:product-info()
{

    "outcome" => "success",
    "result" => [{"summary" => {
        "host-name" => "localhost",
        "instance-identifier" => "8f704bd3-9eac-436a-b6d1-56434eab4363",
        "product-name" => "WildFly Full",
        "product-version" => "10.0.0.Final",
        "product-community-identifier" => "Product",
        "product-home" => "/home/ehsavoie/dev/wildfly/wildfly/dist/target/wildfly-10.0.0.Final",
        "standalone-or-domain-identifier" => "STANDALONE_SERVER",
        "host-operating-system" => "Ubuntu 15.04",
}

 Finally, it's worth mentioning that the standalone script includes also the --version flag which allows (at startup) to check the server version:

$ ./standalone.sh --version
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/francesco/jboss/wildfly-15.0.0.Final

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 

=========================================================================

17:50:51,084 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.7.Final
WildFly Full 15.0.0.Final (WildFly Core 7.0.0.Final)
ntinue . . .                

Older JBoss versions

If you look at the server logs, every application server release boots with information about the server version:

10:23:56,860 INFO  [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)

However interview questions are seldom based on real case examples but more often used to test if you are a smart guy or not. So, in releases 4.X to 6.X you can find it using the jmx-console digging into the jboss.system domain. The following MBean request to find out the JBoss version you are running:

http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServer

Which will return a set of Server properties including the release of the application server:

jboss version jboss version jboss version

0
0
0
s2smodern

Related articles available on mastertheboss.com

JBoss MBeans POJO

JMX MBean services are the core building blocks of the JBoss Appl

How to a dump of JNDI tree with JMX console ?

#2 JBoss Howto. This is the recipe of the day

How to configure JBoss to bind to a different IP ?

  If you want to change the jboss.bind.address property use the 

How to shut down JBoss from remote ?

JBoss recipe of the day

How to create multiple instances of an Mbean?

  Supposing you need two instances of an MBean, let's say one fo

JBoss classloader issues

By default JBoss (prior to version 3.2) uses a flat class loading