- 1 Product Description
- 1.1 Known Versions
- 2 Software Pattern Summary
- 3 Platforms Supported by the Pattern
- 4 Identification
- 4.1 Software Instance Triggers
- 4.2 Software Instance type attributes created
- 4.3 Simple Identification Mappings
- 5 Versioning
- 5.1 Active versioning - by running asadmin command
- 5.1.1 Windows Platforms
- 5.1.2 Unix Platforms
- 5.2 Loading and Parsing a file
- 6 Application Model Produced by Software Pattern
- 6.1 Product Architecture
- 6.2 Software Pattern Model
- 6.2.1 SI Depth
- 7 Testing
- 8 Information Sources
- Discover with BMC ADDM
-
This product can be discovered by any edition of BMC Atrium Discovery and Dependency Mapping. 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 Atrium Discovery gathers about a product and how it is obtained.
- Product Name
- GlassFish Enterprise Server
- Publisher Page
- Category
- Release
- TKU 2010-Dec-1
- In the Spotlight
-
- Change History
- Reports & Attributes
- Publisher Link
- Sun
Product Description
Sun GlassFish Enterprise Server (formerly know as Sun Java System Application Server or SJSAS) is a platform for delivering server-side Java applications and Web services. 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 SJSAS or Sun GlassFish 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
Software Pattern Summary
| Product Component | OS Type | Versioning | Pattern Depth |
|---|---|---|---|
| Domain Administration Server | Unix | Command (Active), File (Active) | Instance-based or Grouped (data dependent) |
| Windows | |||
| Node Agent | Unix | Command (Active), File (Active) | Instance-based or Grouped (data dependent) |
| Windows | |||
| Application Server Instance | Unix | Command (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 Type | Trigger Node | OS Type | Attributes | Condition |
|---|---|---|---|---|
| Domain Administration Server | DiscoveredProcess | Windows | cmd, args | (((cmd matches unix_cmd 'java') or (cmd matches windows_cmd 'javaw?')) and ((args matches regex '-Dcom\.sun\.appserv\.(?:[^ =])=') or (args matches regex '-Dcom\.sun\.enterprise\.(?:[^ =])='))) or (cmd matches regex '(?i)\bappserv(?:DAS)?\.exe$'); |
| Application Server | Unix | |||
| Node Agent | DiscoveredProcess | Windows | cmd, 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.
| Parameter | Argument variable | Example |
|---|---|---|
| domainName (with exception of Node Agent) | -Dcom.sun.aas.domainName | -Dcom.sun.aas.domainName=domain1 |
| instanceName | -Dcom.sun.aas.installRoot | -Dcom.sun.aas.instanceName=server |
| installRoot | -Dcom.sun.aas.domainName | -Dcom.sun.aas.installRoot=/opt/SDK/appserver |
| 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 Name | SI type |
|---|---|
| ApplicationServer | Sun GlassFish Enterprise Server Domain Administration Server |
| Sun GlassFish Enterprise Server | |
| Sun Java System Application Server Domain Administration Server
(if version is 8 or below) | |
| Sun Java System Application Server (if version is 8 or below) | |
| NodeAgent | Sun GlassFish Enterprise Server Node Agent |
| Sun Java System Application Server Node Agent (if version is 8 or below) |
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:
| Name | cmd, args matches |
|---|---|
| 'Sun GlassFish Enterprise ServerNode Agent' | regex '\bjava(?:\.exe)$', regex '-Dcom\.sun\.aas\.isNodeAgent=true' |
| 'Sun GlassFish Enterprise Server' | regex '\bjava(?:\.exe)$', regex '-Dcom\.sun\.appserv\.(?:[^ =])=|-Dcom\.sun\.enterprise\.(?:[^ =])=' |
For SJSAS 8.x versions on Windows platform:
| Name | cmd matches |
|---|---|
| 'Sun GlassFish Enterprise Server Domain Administration Server' | regex '(?i)\bappservDAS\.exe$' |
| 'Sun GlassFish Enterprise Server Node Agent' | regex '(?i)\bappservAgent\.exe$' |
| 'Sun GlassFish Enterprise 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=true
The result of this command is parsed using the following regular expression:
Regular Expression employed to determine the version: (?i)(?: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 ([^)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 ([^)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 both Sun GlassFish Enterprise Server and Node Agent instances . Each GlassFish instance that can be uniquely identified will generate a Software Instance in a Foundation model.
The way Foundation 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.
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: Viktor Moyseyenko 20 March 2009
Reviewed by: Nikola Vukovljak 23 March 2009

