Page tree

Skip to end of metadata
Go to start of metadata
Discover with BMC Discovery
download

This product can be discovered by any edition of BMC Discovery. Download our free Community Edition to try it out, or [see what else it can discover] !

What is this?
This is a product information page, containing details of the information that BMC Discovery gathers about a product and how it is obtained.
Product Name
GlassFish Server
Publisher Page
Oracle
Category
Application Server Software Platforms
Release
TKU 2019-04-1
Change History
Oracle GlassFish Server - Change History
Reports & Attributes
Oracle GlassFish Server - Reports & Attributes
Publisher Link
Oracle

Product Description

 

Extended Discovery pattern which extends the GlassFish discovery with additional data from the GlassFish configuration files and builds a J2EE inferred model of its applications and resources is available for this product.

 

Oracle GlassFish Server (formerly known as Sun GlassFish Enterprise Server and before that Sun Java System Application Server or SJSAS or Sun ONE Application Server) is a platform for delivering server-side Java applications and Web services. Originally produced by Sun Microsystems, GlassFish is a Java EE 5 certified application server and is a core part of the Java Enterprise System. GlassFish supports integrated development technologies such as NetBeans and Eclipse.
GlassFish is based on source code donated by Sun and Oracle Corporation's TopLink persistence system. It uses a derivative of Apache Tomcat as the servlet container for serving Web content.
Further information with regards the identification of Oracle GlassFish Server, Sun GlassFish, SJSAS or Sun ONE can be found later in this document.

Known Versions

Known Sun Java System Application Server versions (below 9.0 they have not appropriate Sun GlassFish Enterprise releases):

  • 7.0
  • 8.0
  • 8.0 Update 1
  • 8.0 Update 2
  • 8.1
  • 8.1 Update 1
  • 8.1 Update 2
  • 8.2

Known Sun GlassFish Enterprise versions:

  • v1
  • v1 Update 1
  • v1 Update 2
  • v2
  • v2.1
  • v2.1 Update 1
  • v2.1 Update 2
  • v2.1.1
  • v3

Known Oracle GlassFish versions:

  • 3.0.1
  • 3.1
  • 3.1.1
  • 3.1.2
  • 4.0

Known Sun ONE Application Server versions:

  • 6.0
  • 6.5
  • 7.0

 

Software Pattern Summary

Product ComponentOS TypeVersioningPattern Depth
Sun ONE Application ServerUnixCommand (Active), File (Active)Instance-based or Grouped (data dependent)
Domain Administration ServerUnixCommand (Active), File (Active)Instance-based or Grouped (data dependent)
Windows
Node AgentUnixCommand (Active), File (Active)Instance-based or Grouped (data dependent)
Windows
Application Server InstanceUnixCommand (Active), File (Active)Instance-based or Grouped (data dependent)
 
Windows

Platforms Supported by the Pattern

The pattern identifies Sun GlassFish Enterprise Server components on Unix and Windows.

Identification

Software Instance Triggers

SI TypeTrigger NodeOS TypeAttributesCondition
Sun ONE Application ServerDiscoveredProcessUnixcmdcmd matches unix_cmd 'appservd'
Domain Administration ServerDiscoveredProcessWindowscmd, args{escapeall}(((cmd matches unix_cmd 'java') or (cmd matches windows_cmd 'javaw?')) and ((args matches regex '-Dcom\.sun\.appserv\.(?:[Oracle GlassFish Server^ =]+)=') or (args matches regex '-Dcom\.sun\.enterprise\.(?:[Oracle GlassFish Server^ =]+)='))) or (cmd matches regex '(?i)\bappserv(?:DAS)?\.exe$'){escapeall}
Application ServerUnix
Node AgentDiscoveredProcessWindowscmd, args(((cmd matches unix_cmd 'java') or (cmd matches windows_cmd 'java(?:w)?')) and ( args matches regex '\scom\.sun\.enterprise\.ee\.nodeagent\.NodeAgentMain')) or (cmd matches windows_cmd 'appservAgent')
Unix

Example:
Unix:

  • /opt/SDK/jdk/bin/java <...> -Dcom.sun.aas.instanceRoot=/opt/SDK/domains/domain1 -Dcom.sun.aas.instanceName=appserv1 -Dcom.sun.aas.installRoot=/opt/SDK -Dcom.sun.aas.instanceName=server -Dcom.sun.aas.configRoot=/opt/SDK/config Dcom.sun.aas.domainName=domain1 <...> -Dcom.sun.enterprise.taglisteners=jsf-impl.jar <...> com.sun.enterprise.server.PELaunch start

    Windows:

  • C:\Program Files\Java\jdk1.5.0_13\bin\java.exe -Dcom.sun.aas.instanceRoot=C:/SunServer/domains/domain1 -Dcom.sun.aas.domainName=domain1 -Dcom.sun.aas.installRoot=C:/SunServer -Dcom.sun.aas.instanceName=server <...> -Dcom.sun.enterprise.taglisteners=jsf-impl.jar <...> com.sun.enterprise.server.PELaunch start

    or

  • C:\Program Files\SDK\appserver\lib\appservDAS.exe domain1

There can be many java processes running on a host, so final decision that current instance is Sun GlassFish is made by the pattern in the trigger by finding in process arguments strings '-Dcom.sun.aas.instanceRoot'.

SJSAS 8.x versions and below on Windows have discrete executable files with only one argument (instance name), so described below is useful information that can be extracted from GlassFish versions.

ParameterArgument variableExample
domainName (with exception of Node Agent)-Dcom.sun.aas.domainName-Dcom.sun.aas.domainName=domain1
-domainname-domainname domain1
instanceName-Dcom.sun.aas.instanceName-Dcom.sun.aas.instanceName=server
-instancename-instancename server
installRoot-Dcom.sun.aas.installRoot-Dcom.sun.aas.installRoot=/opt/SDK/appserver
domainRoot-domaindir-domaindir <path>
instanceRoot-Dcom.sun.aas.instanceRoot-Dcom.sun.aas.instanceRoot=<path>
isNodeAgent (For Node Agent only)-Dcom.sun.aas.isNodeAgent-Dcom.sun.aas.isNodeAgent=true

Software Instance type attributes created

The patterns in this module will set the following attributes:

Pattern NameSI type
ApplicationServerOracle GlassFish Server Domain Administration Server (if version 3.0.1 or greater)
Oracle GlassFish Server (if version 3.0.1 or greater)
Sun GlassFish Enterprise Server Domain Administration Server (if version v1, v2 or 3.0)
Sun GlassFish Enterprise Server (if version v1, v2 or 3.0)
Sun Java System Application Server Domain Administration Server (if version 7.0-8.2)
Sun Java System Application Server (if version 7.0-8.2)
NodeAgentOracle GlassFish Server Node Agent (if version 3.0.1 or greater)
Sun GlassFish Enterprise Server Node Agent (if version v1, v2 or 3.0)
Sun Java System Application Server Node Agent (if version 7.0-8.2)

Simple Identification Mappings

The following components are identified using simple identity mappings. Each component is identified by process name and arguments.

For SJSAS 8.x on Unix platform and GlassFish on Windows platform:

Namecmd matchesargs matches
'Sun ONE Application Server'unix_cmd 'appservd' 
'Oracle GlassFish Server Node Agent'regex '\bjava(?:\.exe)$'regex '-Dcom\.sun\.aas\.isNodeAgent=true'
'Oracle GlassFish Server'regex '\bjava(?:\.exe)$'

regex ' -Dcom\.sun\.appserv\.(?:[Oracle GlassFish Server^ =]+)=|-Dcom\.sun\.enterprise\.(?:[Oracle GlassFish Server^ =]+)='

For SJSAS 8.x versions on Windows platform:

Namecmd matches
'Oracle GlassFish Server Domain Administration Server'regex '(?i)\bappservDAS\.exe$'
'Oracle GlassFish Server Node Agent'regex '(?i)\bappservAgent\.exe$'
'Oracle GlassFish Server'regex '(?i)appserv\.exe$'

Versioning

Versioning ofthis product is attempted in one of two approaches, one of them through active command execution, and the other through retrieval and parsing of a file. The pattern will use the first successful method it can to populate the Software Instance version and product_version attributes.

Active versioning - by running asadmin command

Windows Platforms

For version v1 and later on Windows the pattern determines the value of variable called installRoot (installation path) by looking at argument installRoot passed to java binary instance. The value is extracted using the following regular expression:

Regular Expression employed to determine installRoot: -Dcom\.sun\.aas\.installRoot=(\w:\\\S+) (Path with no spaces)

*Regular Expression employed to determine installRoot:* -Dcom\.sun\.aas\.installRoot="(\w:\\.*)" (Path with quotes and possible spaces)

In case of Sun JSAS 8.x and older for Windows the pattern uses the following regular expression for parsing the value of installRoot from the process command line:

Regular Expression employed to determine installRoot: (?i)^(\w\:.*)\\lib\\.*$'Once the install root (installation path) is obtained, by adding to variable installRoot the following string \\bin\\asadmin.bat version --verbose=true the pattern builds the command used for active versioning:

Active Command Executed: cmd /c ' + '"%installRoot%\\bin\\asadmin.bat" version --verbose=trueThe result of this command is parsed using the following regular expression:

Regular Expression employed to determine the version: (?i)(?:GlassFish|Server|Edition) (v?\d+(?:\.\d+)?(?:_\d+)?)

The product build is parsed from the output using the following regular expression:

Regular Expression employed to determine the build: build ([Oracle GlassFish Server^)s]+)

Unix Platforms

The pattern determines the value of variable called installRoot (installation path) by looking at argument installRoot passed to java binary instance. The value is extracted using the following regular expression:

Regular Expression employed to determine installRoot: -Dcom\.sun\.aas\.installRoot=(/\S+)

In case of a Node Agent instance the pattern uses the same approach but in this case extracting the installRoot from the arguments of one of the child processes of this Node Agent.

Once the install root (installation path) is obtained, by adding to variable installRoot the following string '/bin/asadmin version --verbose=true' the pattern builds the command used for active versioning:

Active Command Executed: %installRoot%/bin/asadmin version --verbose=true

The result of this command is parsed:

Regular Expression employed to determine the version: (?i)(?:Server|Edition) (v?\d+(?:\.\d+)?(?:_\d+)?)

The product build is parsed from the output:

Regular Expression employed to determine the build: build ([Oracle GlassFish Server^)s]+)

Loading and Parsing a file

This versioning method is based on getting content of LICENSE.txt file which has the version of installed product listed. This file is located in the install root (installation) directory. Once the installation path is determined (as described in the section above) and the file is retrieved we parse the result:

Regular Expression employed to determine the version: (?i)Sun\s+.(?:GlassFish\s+Enterprise|Application)\s+Server\s(?:\w+\s+Edition\s*)?\s*(v?\d+(:\.\d+)?)

and if it was successful then parse the update information:

Regular Expression employed to determine the update: (?i)(?:Server|Edition)\s+%full_version%\s+Update\s+(\d+)

Application Model Produced by Software Pattern

Product Architecture

The main structured unit for Sun GlassFish is a domain. Domain can have only one Domain Administration Server (DAS). If current product installation is without clustering support then GlassFish will have single process that serves as DAS and hosts applications. When Clustering support is enabled it can have one or more Node Agents in order to create and control Application Server instances. Those can be either Stand-Alone or Clustered. Cluster can be created in Admin Console and via using local or remote Node Agents can have several Clustered Server instances on current host or even multiple remote hosts.

All Server instances are children of one or more Node Agent (NA). Exception is the DAS instance. Node Agent can be running without any server instances. Thus we need NA to have at least one or more running server instances in order to obtain attributes for NA SI such as domainName and installRoot.

Each correctly working Application Server instance has a child process imqbroker (it performs reliable delivery of messages to and from Java Message Service clients), from arguments of which we can obtain Cluster information if server belongs to one.

Also it is important to note that it is possible to run multiple domains on one host, so pulling out domain name is desirable

Note

Domain names are unique with regards to the DAS that manages them, however they do not have to be unique on a host if there are multiple installations of Sun GlassFish Enterprise Server.

Software Pattern Model

The trigger process used by this pattern in the creation of Sun GlassFish Instances (SI) is the Java VM process (java on Unix, java.exe or javaw.exe on Windows) with string '-Dcom.sun.aas.installRoot=' (in case of DAS or Application Server) or 'com.sun.enterprise.ee.nodeagent.NodeAgentMain' (in case of NA) in its arguments, or stand-alone binary on Windows like appservDAS.exe (DAS), appserv.exe (Application Server), appservAgent.exe (NA).

SI Depth

By default the pattern produces a Deep (Instance Based) Software Instance for Server, Domain Administration Server and Node Agent instances. Each GlassFish instance that can be uniquely identified will generate a Software Instance in an ADDM model.
The way ADDM enumerates different instances is by looking for and storing the mentioned above instanceName, domainName and installRoot parameters (pulled out from args of needed process) as well as the discovered SI type. These three values combined together with host's key grant uniqueness of each GlassFish instance. In cases where the pattern cannot obtain this information the pattern creates an SI using a key group based on installRoot. If even the value of installRoot is not retrieved by the pattern (very rare) the SI created has an automatically generated key and the SI will provide a number of running processes that have been mapped to this product.

GlassFish Extended J2EE Discovery

The GlassFish Extended J2EE Discovery pattern extends the GlassFish discovery with additional data from the GlassFish configuration files and builds a J2EE inferred model of its applications and resources.

Testing

We tested the pattern for Sun GlassFish Enterprise Server/ Sun GlassFish using against hosts running Sun GlassFish Enterprise running on both Unix and Windows platforms.

Information Sources


Created by: Viktor Moyseyenko 24 October 2008
Updated by: Rebecca Shalfield 23 April 2013
Reviewed by: Alex Kashkevich 24 April 2013

1 Comment

  1. Is it possible to monitor GlassFish 4.1 with TrueSight?