The Unisys.AgileBusiness.RuntimeAPI namespace contains the IConfigureSystem interface that enables you to configure AB Suite Windows runtime for performance optimization. The interface enables you to
Use the SQL Datareader feature when reading from the database via the LDL+ commands. The LDL+ commands include Determine, Lookup, and ForEach.
Set the Transaction Isolation Level, which is an extension of the "DataReader" settings.
Configure Phased SQL and Non-Phased SQL for database reads.
Set the "Multi" behavior for database reads.
Configure the component settings for a deployed system.
The RuntimeFactory class includes methods to return the IConfigureSystem objects.
Refer to Definition of the IConfigureSystem Interface for more information about the interface.
Namespace: Unisys.AgileBusiness.RuntimeAPI
Assembly: Unisys.AgileBusiness.RuntimeAPI (in Unisys.AgileBusiness.RuntimeAPI.dll)
Syntax:
The IConfigureSystem object can be created by using the RuntimeFactory. GetConfigureSystem(string systemName) method.
IConfigureSystem SystemConfig = RuntimeFactory. GetConfigureSystem(systemName)
The IConfigureSystem interface exposes the following members.
Methods
Method | Description |
---|---|
SetComponentProperties() | Called by an application to configure the pooling settings and user role information of an AB Suite generated COM+ application. |
SetDataReader() | Called by an application to configure AB Suite Windows Runtime to use the SQL Datareader feature when using the LDL+ commands such as, Determine, Lookup and ForEach. |
SetMultiBehavior() | Called by an application to configure the "Multi" behavior for database reads. |
SetPhasedSql() | Called by an application to configure the Phased SQL versus Non-Phased SQL for database reads. |
SetTransactionIsolationLevel () | Called by an application to configure "Transaction Isolation Level" in AB Suite Windows Runtime. |
Note: The interface enables you to perform the administration tasks required for the pre-deployed applications.
Required Security Privileges
By default, only a local administrator can access the methods.
IConfigureSystem.SetComponentProperties Method
This method allows you to configure the component settings such as, Application Pooling and Recycling, Object Pooling, and Role settings for a deployed system.
Syntax
The syntax of the SetComponentProperties method is
SetComponentProperties (Unisys.AgileBusiness.RuntimeAPI. ComponentProperties properties)
Argument
properties: ComponentProperties object
The object describes all the ComponentProperties values and parameters available from the ComponentProperties class. The ComponentProperties class exposes members that configure the application pooling and user role information.
Members of ComponentProperties class
Name | Type | Description |
---|---|---|
ApplicationName | string | COM+ application name |
ApplicationPoolSize | int | Application pool size |
CreationTimeout | int | Amount of time in minutes after which the activation of new segment objects is stopped. |
MaximumPoolSize | int | Maximum number of segment objects in a pool. The default maximum pool size value is 1048576. |
MinimumPoolSize | int | Minimum number of segment objects in a pool. The default value for minimum pool size is 0. |
RecycleActivationLimit | int | Amount of time in minutes that the DllHost is in "Recycling” state after which it is activated. |
RecycleCallLimit | Int | Maximum number of instances of an application (Dllhost) that is processed before they are recycled. |
RecycleExpirationTimeout | int | Amount of time in minutes that DllHost is in "Recycling" state before being forcibly shut down. |
RecycleLifetimeLimit | int | Amount of time in minutes after which DllHost is recycled. |
RecycleMemoryLimit | int | Memory limit in KB of a DllHost process after which it automatically enters the recycling state. The default value is 0. |
Roles | List<ComponentRoles> | List of COM+ roles |
The "Roles" member belongs to the <ComponentRoles> class and consists of the following exposed members.
Members of ComponentRoles class
Name | Type | Description |
---|---|---|
RoleName | string | Role name |
UserNames | List <string> | List of users |
Refer to Configure System Utility for more information about the various member settings and restrictions. Refer to the Agile Business Suite Installation and Configuration Guide for information about the available COM+ roles.
Return Value
If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any.
IConfigureSystem.SetDataReader Method
This method allows you to use the MS SQL Datareader feature when accessing the LDL+ commands such as Determine, Lookup, and ForEach while reading from a database. You can configure a runtime system to use Datareader selectively. This means you can use the Datareader method for all or part of your system. For example: In defined ispecs and reports only.
The default mechanism to read records from the database by using the Server-side cursors can be replaced by using the Datareader feature. The Datareader reads a complete result set of records into a memory cache and the Determine commands returns records from the result set in the memory cache. Alternatively, the cursors read one record at a time and the next record is retrieved from the database at the beginning of an iteration of a Determine loop. If a profile or table is updated during the read process, the changes are visible in the subsequent iterations of the Determine loop.
Note: Most of the Determine commands can use the Datareader feature except where a "Sleep" command occurs within a Determine loop. The decision of using the Datareader or Cursors is automatic and internal depending on the validity of the Determine commands.
Syntax
The syntax of the SetDataReader method is
SetDataReader(Unisys.AgileBusiness.RuntimeAPI.DataReaderParameter parameter)
Argument
parameter: DataReaderParameter object
The object describes all the DataReaderparameter values and parameters available from the DataReaderParameter class. The DataReaderParameter class exposes members that determine the ispec name or report name. You can set the Datareader feature to be used in the following scenarios:
In all the Determine commands across the system including the ispecs and reports
In reports only
In all reports and selected number of ispecs
In most reports except few reports where performance is not optimal or Datareader behavior is incorrect
Members of DataReaderParameter class
Name | Type | Description |
---|---|---|
IspecName | string | Ispec name |
ReportName | string | Report Name |
IspecValue | enum ConfigurationStatus | You can set the Datareader status of an individual ispec to enable or disable. Configuration status: Enable/Disable |
OnlineValue | enum ConfigurationStatus | You can set the Datareader status of a system. Configuration status: Enable/Disable |
ReportsValue | enum ConfigurationStatus | You can set the Datareader status for all reports. Configuration status: Enable/Disable |
ReportValue | enum ConfigurationStatus | You can set the Datareader status for specific report or reports. Configuration status: Enable/Disable |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the argument.
IConfigureSystem.SetMultiBehavior Method
This method allows you to define the "Multi" behavior when the Server-side cursors are used to read records from a database. Although by using cursors, a database retrieves one record at a time, you can define the "Multi" behavior that enables a database to retrieve a block of multiple records into an intermediate memory buffer. You can specify the number of records to retrieve in each block by defining the "Multi" value.
Note: The "Multi" behavior of Server-side cursors is useful when Datareader cannot be used. Although the "Multi" behavior can be specified for the whole system, all reports, or for individual ispec and report, it is recommended to define the "Multi" behavior for individual reports, where the configuration status of Datareader is "Enable".
Syntax
SetMultiBehavior(Unisys.AgileBusiness.RuntimeAPI.MultiParameter parameter)
Argument
parameter: MultiParameter
The object describes all the Multiparameter values and parameters available from the MultiParameter class. The MultiParameter class exposes the following members.
Members of MultiParameter class
Name | Type | Description |
---|---|---|
IspecName | string | Ispec name |
ReportName | string | Report Name |
IspecValue | int | "Multi" value for an individual ispec |
OnlineValue | int | "Multi" value of the whole system |
ReportsValue | int | "Multi" value for all the reports |
ReportValue | int | "Multi" value for an individual report |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.
IConfigureSystem.SetPhasedSql Method
This method allows you to define Phased or Non-Phased SQL for reading records from a database. A Phased SQL with a defined number of phases specifies the number of SQL SELECT statements submitted for retrieving records. The number of phases to retrieve all records for the Determine command is dependent on the number of keys on a profile and the type of Determine command. A Non-Phased SQL uses a single SQL SELECT statement to retrieve all the records.
Syntax
SetPhasedSql(Unisys.AgileBusiness.RuntimeAPI.PhasedSqlParameter parameter)
Argument
parameter: PhasedSqlParameter
The object describes all the PhasedSqlParameter values and parameters available from the PhasedSqlParameter class. The PhasedSqlParameter class exposes the following members.
Members of PhasedSqlParameter class
Name | Type | Description |
---|---|---|
IspecName | string | Ispec name |
ReportName | string | Report Name |
IspecValue | Enum IsolationLevel | You can define phased or non-phased SQL SELECT statement to be submitted for an individual ispec. Configuration status: Enable/Disable |
OnlineValue | int | You can define phased or non-phased SQL SELECT statement to be submitted for a system. Configuration status: Enable/Disable |
ReportsValue | int | You can define phased or non-phased SQL SELECT statement to be submitted for all reports. Configuration status: Enable/Disable |
ReportValue | int | You can define phased or non-phased SQL SELECT statement to be submitted for an individual report. Configuration status: Enable/Disable |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.
IConfigureSystem.SetTransactionIsolationLevel Method
This method allows you to set the "Transaction Isolation Level" in AB Suite Windows Runtime. Following are the available Transaction Isolation Level settings.
Read Uncommitted: In this setting, the SQL Server does not place any lock on the table and the table can be updated by any transactions while the Determine loop is in progress.
Read Committed: In this setting, the SQL Server places a lock on the entire table and the table remains locked until the Determine loop has exited.
Repeatable Read: In this setting, the SQL Server reads and commits a row of a table in a transaction, only if the row is not updated by another transaction.
Serializable: In this setting, the SQL Server ensures that all the rows are read while parsing the operations in a transaction. The SQL Server places a lock on the range of rows that is affected by a transaction.
Snapshot: In this setting, the Determine loop displays consistent data from a table that existed at the start of the transaction and returns an error if a table is updated by any transactions while the Determine loop is in progress.
The default setting is "Read Committed".
Syntax
SetTransactionIsolationLevel(Unisys.AgileBusiness.RuntimeAPI. TransactionIsolationLevelParameter parameter)
Argument
parameter: TransactionIsolationLevelParameter
The object describes all the TransactionIsolationLevelParameter values and parameters available from the TransactionIsolationLevelParameter class. The TransactionIsolationLevelParameter class exposes the following members.
Members of TransactionIsolationLevelParameter class
Name | Type | Description |
---|---|---|
IspecName | string | Ispec name |
ReportName | string | Report Name |
IspecValue | enum IsolationLevel | Isolation level of an individual ispec: Read Committed, Read UnCommitted, RepeatableRead, Serializable, Snapshot |
OnlineValue | enum IsolationLevel | Isolation level of a system: Read Committed, Read UnCommitted, RepeatableRead, Serializable, Snapshot |
ReportsValue | enum IsolationLevel | Isolation level for all the reports: Read Committed, Read UnCommitted, RepeatableRead, Serializable, Snapshot |
ReportValue | enum IsolationLevel | Isolation level of an individual report: Read Committed, Read UnCommitted, RepeatableRead, Serializable, Snapshot |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.
Using the IConfigureSystem Interface
The following steps and code example illustrates the implementation of IConfigureSystem for configuring the Datareader ,Multi feature of MS SQL Server, and configuring the component settings of AB Suite generated COM+ application:
Create a new C# Class Library in Microsoft Visual Studio.
Add a reference to the following assembly that you need when calling from the Class Library,
Unisys.AgileBusiness.RuntimeAPI.dll (from <AB Suite 7.0 Installation directory>\bin64 folder)
Add the following code to the Class to configure AB Suite Windows runtime:
namespace SampleSystem { using System; using Unisys.AgileBusiness.RuntimeAPI; class Program { static void Main(string[] args) { //Get the ConfigureSystem IConfigureSystem configSystem = RuntimeFactory.GetConfigureSystem("Sample"); //Create the DataReader parameter DataReaderParameter parameter = new DataReaderParameter() { IspecName = "ISP1", IspecValue = ConfigurationStatus.Enable, ReportName = "REP1", ReportValue = ConfigurationStatus.Enable, OnlineValue = ConfigurationStatus.Disable, ReportsValue = ConfigurationStatus.Disable }; //Set DataReader configuration StatusInfo status = configSystem.SetDataReader(parameter); //Multi configuration //Create Multi parameter MultiParameter parameter = new MultiParameter() { IspecName = "ISP1", IspecValue = 20, ReportName = "REP1", ReportValue = 10, OnlineValue = 20, ReportsValue = 20 }; //Set Multi configuration status = configSystem.SetMultiBehavior(parameter); //Configure COM+ settings of Sample //Create the ComponentProperties parameter //Create users list IList<string> users = new List<string>(); users.Add( User1 ); IList<ComponentRoles> rolesList = new List<ComponentRoles>(); ComponentRoles role = new ComponentRoles() { RoleName = Application Administrators, UserNames = users }; rolesList.Add(role); ComponentProperties parameter = new ComponentProperties() { ApplicationPoolSize = 3, RecycleLifetimeLimit = 10080, RecycleMemoryLimit = 750000, RecycleExpirationTimeout= 20, MinimumPoolSize = 5, MaximumPoolSize = 5, Roles = rolesList }; //Set COM+ configuration status = configSystem.SetComponentProperties(parameter); } } }
Definition of the IConfigureSystem Interface
Following is the definition of the IConfigureSystem interface:
namespace Unisys.AgileBusiness.RuntimeAPI { public interface IConfigureSystem { StatusInfo SetComponentProperties (Unisys.AgileBusiness. RuntimeAPI. ComponentProperties properties); StatusInfo SetDataReader(Unisys.AgileBusiness.RuntimeAPI. DataReaderParameter parameter); StatusInfo SetMultiBehavior(Unisys.AgileBusiness.RuntimeAPI. MultiParameter parameter); StatusInfo SetPhasedSql(Unisys.AgileBusiness.RuntimeAPI. PhasedSqlParameter parameter); StatusInfo SetTransactionIsolationLevel(Unisys.AgileBusiness. RuntimeAPI. TransactionIsolationLevelParameter parameter); } }