loggingAppData bean

The LoggingAppData bean identifies the application that is writing the log entry. The fully qualified class name for the bean is com.ibm.paydir.ima.txacc.data.objects.LoggingAppData.

The LoggingAppData bean identifies the application in the following ways:

  • A single attribute product instance identifier.
  • A multiple attribute product instance identifier. This identifier is a unique combination of the following attributes:
    • Hostname
    • Product name
    • Product version
    • Product qualifier

This bean has the following constructors to use to create an instance of the bean.

  • A single argument constructor that uses the single attribute product instance identifier.
  • A multiple argument constructor that fully populates the bean by specifying all of its attributes.

The single argument constructor cannot be used to create the first product instance. Only the multiple argument constructor initializes the product instance and creates the identifier value. When successful, it returns the resulting single attribute product instance identifier to be used for this application. After the single product instance identifier is known, use the single argument constructor.

The multiple argument constructor accepts strings for the following values:

  1. Product name
  2. Hostname
  3. Product version
  4. Product qualifier
  5. Build level
  6. Build date
  7. Build time
Note: Viewing name is not a parameter for this constructor. Its initial value is set to the product name. To change the viewing name, use the method that is provided by the loggingAppData bean to set the viewing name.

When the multiple argument constructor is used to create one or more instances of LoggingAppData for the same application, ensure that the following criteria are met.

  1. The values specified for the multiple attributes that make up the product instance identifier for this application are unique.
  2. The same multiple attribute product instance identifier is always used for the same application. Varying the multiple attributes across invocations for the same application can cause unnecessary work during logging and can use unnecessary database resources.

When the application has a new version, or it is moved to a new host system, the unique multiple attribute product instance identifier must change.

LoggingAppData has more attributes that can be used by the application that is doing the logging. These attributes provide more information about the application and do not have to have unique values. They are also used by the Control Center user interface.

The following table shows the attributes for the LoggingAppData bean.
Table 1. loggingAppData attributes
Attribute name Example Description
Host name "balancing.example.com" The name of the host system where this instance of the application is running. It must be a String of 255 characters or less.
Note: This attribute is part of the multiple attribute product instance identifier.
Product name "My Bank Balancing" A unique name for the application. It must be a String of 30 characters or less.
Note: This attribute is part of the multiple attribute product instance identifier.
Product version "1.2.5.0" The version of the application. It must be a String of 12 characters or less.
Note: This attribute is part of the multiple attribute product instance identifier.
Product qualifier "balancing.example.com:2421" A unique name for the specific instance of the application that is posting the log entry. It must be a String of 32 characters or less.
Note: This attribute is part of the multiple attribute product instance identifier.
Viewing name "Streamline Balancing" The name that the Control Center shows for the application. It must be a String of 80 characters or less. If it is not specified, the product name is used by default.
Build level "TEST LEVEL 1.2.5.13" The build level of the application. It must be a String of 64 characters or less.
Build date "2020-APR-09" The build date of the application. It must be a String of 16 characters or less.
Build time "04:35:00 PM CST" The time that the application was built. It must be a String of 16 characters or less.
After an instance of the LoggingAppData bean is created, its contents can be modified by using the methods that are shown in the following table.
Table 2. loggingAppData methods
Method name Takes data type Description
setProductInstanceId int Sets the single attribute product instance identifier for the application.
Note: If this value is specified, the other attributes are ignored.
setProductName String Sets the product name for the application.
setViewingName String Sets the name to be displayed for the application.
setHostname String Sets the name of the host system for the application.
setVersion String Sets the product version for the application.
setQualifier String Sets the product qualifier for the application.
setBuildLevel String Sets the build level for the application.
setBuildDate String Sets the build date for the application.
setBuildTime String Sets the build time for the application.