How to programatically get the name and version of the JBoss server ?

Solution Verified - Updated -

Issue

  • Need to identify the JBoss as Application Server and it's version.
  • How to use ServerConfigLocator.locate() while migrating applications to the new JBoss EAP 6.1 to get ServerName as following:
ServerConfig serverConfig = ServerConfigLocator.locate();
return serverConfig.getServerName();

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content