GlassFish Transaction Service Test

A transaction is a series of discreet actions in an application that must all complete successfully. By enclosing one or more actions in an indivisible unit of work, a transaction ensures data integrity and consistency.

If all these actions complete successfully, the transaction is committed. If any action fails, all changes from the preceding steps are rolled back. This type of event is called a rollback. A normal transaction ends in either a committed state or a rolled back state.

The transaction manager makes it possible to commit and roll back distributed transactions.

By monitoring the transaction manager, you can determine the transaction load on the GlassFish Enterprise server, detect transaction rollbacks, and receive regular updates on transaction status. The Transaction Service test does all the above.

Target of the test : A GlassFish server

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the GlassFish Enterprise server being monitored.

Configurable parameters for the test
Parameters Description

Test Period

How often should the test be executed.

Host

The host for which the test is to be configured.

Port

The port number at which the specified host listens

JMX Remote Port

To collect metrics from a GlassFish Enterprise server, the eG agent monitoring that server should be configured to use JMX to connect to the JRE used by the server and pull out the metrics of interest. By default, JMX support is enabled for the JRE used by the GlassFish Enterprise Server. The JMX connector listens on port 8686 by default. Therefore, type 8686 as the JMX Remote Port. If JMX listens on a different port in your environment, then specify the same here. To know the port at which JMX listens, open the domain.xml file in the <GLASSFISH_INSTALL_DIR>\Sun\AppServer\domains\domain1\config directory and look for the code block shown below:

<jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false">

The port number specified against the Port parameter in the code block above refers to the JMX Remote Port.

JMX User,
JMX Password, and Confirm Password

By default, the JMX connector on the GlassFish Enterprise Server requires authentication. To enable the eG agent to use JMX therefore, you need to configure the agent with the credentials of a user who is authorized to use JMX. Typically, the GlassFish administrator has the right to use JMX. You can hence configure the JMX User and JMX Password parameters with the credentials of the administrator. However, if you prefer not to expose the credentials of an administrator owing to security considerations, you can use the credentials of any other user with access rights to JMX. To know the name of such a user, open the domain.xml file in the <GLASSFISH_INSTALL_DIR>\Sun\AppServer\domains\domain1\config directory and look for the code block shown below:

<jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false">

The user name specified against the auth-realm-name parameter in the code block above can be configured as the JMX User, and the Password of that user can be specified against JMX Password. Confirm the JMX Password you specify by retyping that password in the Confirm Password text box.

JNDIName

The JNDIName is a lookup name for connecting to the JMX connector. By default, this is jmxrmi. If you have registered the JMX connector in the RMI registry using a different lookup name, then you can change this default value to reflect the same. 

JMX Provider

This test uses a JMX Provider to access the MBean attributes of the GlassFish Enterprise server and collect metrics. Specify the package name of this JMX Provider here. By default, this is set to com.sun.jmx.remote.protocol.

Timeout

Specify the duration (in seconds) for which this test should wait for a response from the GlassFish Enterprise server. If there is no response from the server beyond the configured duration, the test will timeout. By default, this is set to 240 seconds. 

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Active transactions

Indicates the number of transactions that were active on the server during the last measurement period.

Number

This is a good indicator of the transaction load on the server.

Rollback transactions

Indicates the number of transactions that were rolled back during the last measurement period.

Number

Rollbacks are resource-intensive operations. Ideally therefore, the value of this measure should be low.

Committed transactions

Indicates the number of transactions that were committed during the last measurement period.

 

Number

 

Transaction state

Indicates whether the transactions are currently in a frozen state or not.

 

If a transaction that you intend to rollback is active, then you will have to freeze that transaction before attempting the rollback. Freezing a transaction avoids the possibility of that transaction completing before the rollback request is issued.

This measure reports the value True if the transaction is currently frozen and reports the value False if the transaction is currently active.

The numeric values that correspond to the measure values described above are listed in the table below:

Measure Value Numeric Value
True 1
False 0

Note:

This measure reports the Measure Values listed in the table above to indicate the state of transactions. However, in the graph of this measure, the transaction state is indicated using only the Numeric Values listed in the above table.