Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Core Engine Configuration : Core Engine

Core Engine
The Core Engine provides the main functionality of TIBCO API Exchange Gateway at runtime.
Starting Core Engine
To start the Core Engine, use the following command format. See Table 11, Core Engine Command-Line Options for the various command-line options.

 
ASG_HOME/bin/asg-engine [-h] [--propFile startup property file] [-p custom property file] [-n engine name] [-d][-a asg config folder] [-c CDD file] [-u processing unit ID]  [EAR file]

 
 
When you execute asg-engine, by default, it looks for a property file of the same name (asg-engine.tra) in the directory where you execute the command. This property file provides the startup values and other parameters to the engine executable.
To explicitly specify a path and filename of the startup property file, use the --propFile parameter. For example, to use asg_startup.tra file as the startup property file for the Core Engine, specify the --propFile parameter as follows:
Specifies the path and filename of a custom property file to be passed to asg-engine. You can also pass multiple custom property files.
The default is default.cdd.
If you do not specify the EAR file name and no tibco.repourl property is set, the EAR file defaults to ASG_HOME/bin/asg_core.ear for all processing units of TIBCO API Exchange Gateway.
If you do not specify the EAR file name and tibco.repourl property is set, the Core Engine uses the tibco.repourl property as the EAR file path and name. To use this property, add it to the asg-engine.tra file. If you deploy the Core Engine using TIBCO Administrator, the property is added to the generated TRA file automatically.
Processing Units of Core Engine
Processing units deploy as engines within which the agents run. In the Processing Units tab of the CDD file (See CDD File and Processing Units), you can define which agents to include in the processing unit and which logging configuration to use.
Processing units are configured in the CDD files as follows:
ASG_HOME/bin/asg-core.cdd
ASG_HOME/bin/asg_cl.cdd
ASG_HOME/bin/asg_validation.cdd
By default, the Core Engine supports the following processing units:
The main processing unit of TIBCO API Exchange Gateway is asg-core. The asg-core provides the critical gateway functions at run time. This requires a separate Cache Agent running to provide the caching functionality at run time and function properly.
asg-caching-core is a processing unit of TIBCO API Exchange Gateway that provides the gateway functions at run time including the caching functionality. This agent is a cache-enabled stand alone Core Engine and does not require a separate Cache Agent running.
asg-gtm is a processing unit of TIBCO API Exchange Gateway that provides the functionality of the Global Throttle Manager at run time.
asg-cache is a processing unit of TIBCO API Exchange Gateway that provides the caching functionality to the Core Engine.
asg-cache-cleanup is a processing unit of TIBCO API Exchange Gateway that starts the Cache Cleanup Agent to clear the cache based on the size and age of the cached values.
asg-cl is a processing unit of TIBCO API Exchange Gateway that provides the functionality of the Central Logger component at run time.
asg-validate is a processing unit of TIBCO API Exchange Gateway that validates for the correct configuration to be used at run time.
Configuring Log Files Settings
The Core Engine logs the messages in the files. This section explains the configuration settings required for the log files.
The configuration for the log files are defined as log configurations for a processing unit. Each processing unit references a log configuration. The log configurations are defined in the Collections tab of the CDD file depending on the processing unit. For example, use ASG_HOME/bin/asg_cl.cdd for the asg-cl processing unit and ASG_HOME/bin/asg_core.cdd for rest of the run time processing units.See CDD File and Processing Units to find the CDD file for a processing unit.
For a reference to the settings, see File Properties Settings for a Log Configuration in the CDD Collections Tab.
Select the Enable check box to enable log files to be written. Configure the settings in this section to specify details. If this check box is cleared, all other properties in this section are ignored.
For example, for the asg-caching-core processing unit, the log file name defaults to asg-caching-core.log.
The number of log files to keep. When the value set in the Max size field is reached, a new log file is created for the next log entries. Files are created up to the value set in the Max number field. The oldest file is deleted when a new file is added after this value is reached.
Log File Name and Location
Set the name and location of the log file for a log configuration using the Name and Directory settings. See File Properties Settings for a Log Configuration in the CDD Collections Tab.
If you do not type a leading slash, the files are stored relative to the working directory (the directory in which you start the asg-engine.exe executable). If you do not specify a name, the name of the processing unit is used. If no processing unit name is specified, the name defaults to processing unit name.log.
Number and Size of Log Files
You can set the size of a single log file, the number of files to keep, and whether a log file is flushed when the Core Engine starts, or whether entries are appended. See File Properties Settings for a Log Configuration in the CDD Collections Tab.
The maximum size of the file is defined in bytes and the default value is configured as 10MB.
Set the Log File Configuration Settings in a CDD File
You can edit the parameters for log file configuration in the Cluster Deployment Descriptor (asg_core.cdd) file as follows:
Task A Copy the asg_core.cdd File to ASG_DefaultImplementation Project
Copy the asg_core.cdd file from the Core Engine directory to the ASG_DefaultImplementation project directory as follows:
1.
Navigate to the ASG_HOME/bin directory.
2.
Copy the asg_core.cdd file to ASG_HOME/projects/ASG_DefaultImplementation folder.
Task B Import the ASG_DefaultImplementation Project
1.
2.
Task C Edit the asg_core.cdd File
Set the log file configuration settings in the asg_core.cdd file as follows:
1.
In the Studio Explorer, expand the ASG_DefaultImplementation project node. Verify that you see the asg_core.cdd file.
2.
Double-click the asg_core.cdd file.
3.
Select and expand Collections tab.
4.
Select Log Configurations > logConfig.
5.
Go to Configuration > Files section.
6.
7.
Task D Copy the asg_core.cdd File to Engine directory
Copy the modified asg_core.cdd file from the ASG_DefaultImplementation project directory to the Core Engine directory as follows:
1.
Back up the original asg_core.cdd file in the ASG_HOME/bin directory.
2.
Copy the modified asg_core.cdd file from ASG_HOME/projects/ASG_DefaultImplementation to the ASG_HOME/bin directory.
If you select the Copy projects into workspace option during the import of the project, the modified asg_core.cdd file exists in the workspace directory. Make sure to copy the asg_core.cdd file from the workspace directory to the ASG_HOME/bin directory.
Logging Levels of Core Engine
You can define a level of logging for the Core Engine. A level corresponds to what types of messages are logged to the log files and what types of messages are filtered out.
Levels of Logging
This section explains the various levels of logging available for the Core Engine.
The following logging levels are supported:
Specifies Error level of logging.
 
The Levels property in the CDD Collections Tab should be at least set to 1 (INFORMATION) for the log levels of the Core Engine to work.
How to Set the Logging Level for the Core Engine
Set the logging level using the tibco.clientVar.ASG/Logging/MinLogLevel property defined in the ASG_CONFIG_HOME/asg/asg.properties file as follows:
tibco.clientVar.ASG/Logging/MinLogLevel=1
The default value is 1, which is INFORMATION level of logging.
For example, on the Windows platform, the value of ASG_CONFIG_HOME is C:\ProgramData\TIBCOASG\tibco\cfgmgmt.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved