Upload
truongtuong
View
257
Download
3
Embed Size (px)
Citation preview
Rocket U2 Web DevelopmentEnvironment
Administrator’s Guide
Version 5.3.0
July 2017WDE-530-ALL-AM-01
2
NoticesEdition
Publication date: July 2017Book number: WDE-530-ALL-AM-01Product version: Version 5.3.0
Copyright© Rocket Software, Inc. or its affiliates 1996-2017. All Rights Reserved.
Trademarks
Rocket is a registered trademark of Rocket Software, Inc. For a list of Rocket registered trademarks goto: www.rocketsoftware.com/about/legal. All other products or services mentioned in this documentmay be covered by the trademarks, service marks, or product names of their respective owners.
Examples
This information might contain examples of data and reports. The examples include the names ofindividuals, companies, brands, and products. All of these names are fictitious and any similarity tothe names and addresses used by an actual business enterprise is entirely coincidental.
License agreement
This software and the associated documentation are proprietary and confidential to Rocket Software,Inc. or its affiliates, are furnished under license, and may be used and copied only in accordance withthe terms of such license.
Note: This product may contain encryption technology. Many countries prohibit or restrict theuse, import, or export of encryption technologies, and current use, import, and export regulationsshould be followed when exporting this product.
3
Corporate informationRocket Software, Inc. develops enterprise infrastructure products in four key areas: storage, networks,and compliance; database servers and tools; business information and analytics; and applicationdevelopment, integration, and modernization.
Website: www.rocketsoftware.com
Rocket Global Headquarters77 4th Avenue, Suite 100Waltham, MA 02451-1468USA
To contact Rocket Software by telephone for any reason, including obtaining pre-sales informationand technical support, use one of the following telephone numbers.
Country Toll-free telephone number
United States 1-855-577-4323Australia 1-800-823-405Belgium 0800-266-65Canada 1-855-577-4323China 400-120-9242France 08-05-08-05-62Germany 0800-180-0882Italy 800-878-295Japan 0800-170-5464Netherlands 0-800-022-2961New Zealand 0800-003210South Africa 0-800-980-818United Kingdom 0800-520-0439
Contacting Technical Support
The Rocket Community is the primary method of obtaining support. If you have current support andmaintenance agreements with Rocket Software, you can access the Rocket Community and reporta problem, download an update, or read answers to FAQs. To log in to the Rocket Community or torequest a Rocket Community account, go to www.rocketsoftware.com/support.
In addition to using the Rocket Community to obtain support, you can use one of the telephonenumbers that are listed above or send an email to [email protected].
4
Contents
Notices................................................................................................................................................................................... 2
Corporate information......................................................................................................................................................... 3
Chapter 1: Rocket U2 Web Development Environment overview..................................................................................... 7Introduction...............................................................................................................................................................7Web DE components................................................................................................................................................ 7
Chapter 2: Creating a Web DE-enabled U2 account.......................................................................................................... 8Creating a U2 server definition................................................................................................................................8Editing a U2 server definition.................................................................................................................................. 9Connecting to a U2 server....................................................................................................................................... 9Disconnecting from a U2 server.............................................................................................................................. 9Creating a U2 account............................................................................................................................................10Enabling an account for U2 Web DE..................................................................................................................... 10Editing the configuration files............................................................................................................................... 11
Inserting an account reference in the JavaScheduler.ini file.................................................................. 12Inserting an account reference in the rgw5.ini file.................................................................................. 14Editing the rgw5.ini file on a remote web server..................................................................................... 15
Encrypting a password...................................................................................................................15
Chapter 3: Setting up application modules......................................................................................................................16Creating a module.................................................................................................................................................. 16Deleting a module.................................................................................................................................................. 17
Chapter 4: Creating files.....................................................................................................................................................18Creating U2 database files.....................................................................................................................................18
Chapter 5: Managing garbage collection.......................................................................................................................... 23Starting phantom control...................................................................................................................................... 23Viewing the log....................................................................................................................................................... 24Stopping the phantom control..............................................................................................................................25Running garbage collection without the phantom..............................................................................................25State management................................................................................................................................................. 25WWSTATE file size guidelines................................................................................................................................ 26WWSESSION file size guidelines............................................................................................................................ 26
Chapter 6: Managing users................................................................................................................................................ 27Creating a Web DE user..........................................................................................................................................27Viewing, editing, or deleting a user.......................................................................................................................28Application security and Web DE.......................................................................................................................... 28
Chapter 7: Restricting administrative views and functionality....................................................................................... 30Creating, compiling, and cataloging the subroutine........................................................................................... 30Viewing the activity log.......................................................................................................................................... 32
Chapter 8: Managing concurrency control....................................................................................................................... 34Concurrency control in Web DE.............................................................................................................................34
Locking and unlocking an RBO................................................................................................................. 34
Chapter 9: Managing revision control............................................................................................................................... 35Setting up revision control.................................................................................................................................... 35
Chapter 10: Configuring and running the Java Scheduler.............................................................................................. 37Managing the Java Scheduler on Windows..........................................................................................................37
Configuring the Java Scheduler (Windows)..............................................................................................37Modifying default global settings (Windows)............................................................................... 37Modifying account settings (Windows)......................................................................................... 39
Contents
5
Inserting an account in the Java Scheduler configuration file (Windows)..................................42Running the Java Scheduler on Windows................................................................................................ 42
Viewing the Java Scheduler log.................................................................................................... 43Monitoring performance on Windows.......................................................................................................44
Defining the yellow and red triggers of the monitor from the cm.ini file....................................46Viewing RBO process details and the BASIC call stack................................................................ 47Viewing exceptions......................................................................................................................... 48Changing the monitor settings...................................................................................................... 49Filtering accounts in the monitor table........................................................................................ 50Monitoring client threads...............................................................................................................50Configuring the monitor table columns........................................................................................51Configuring the parameters to work with your system............................................................... 52
Registering or unregistering the Java Scheduler as a Windows service................................................. 52Managing the Java Scheduler on UNIX.................................................................................................................53
Configuring the Java Scheduler (UNIX).....................................................................................................53Modifying environment variables (UNIX)...................................................................................... 54Modifying account settings (UNIX)................................................................................................ 54Adding an account to the Java Scheduler configuration file (UNIX)........................................... 56
Modifying environment variables on UNIX............................................................................................... 56Running the Java Scheduler on UNIX....................................................................................................... 57Monitoring performance on UNIX..............................................................................................................58
Chapter 11: Using the Admin API Server.......................................................................................................................... 61Configuring, starting, and stopping the Admin API Server..................................................................................61The Connection Manager Admin API Server.........................................................................................................62
Connection Manager Admin API paths..................................................................................................... 62Start the Connection Manager...................................................................................................... 62Stop the Connection Manager.......................................................................................................62Get accounts................................................................................................................................... 63Get account information................................................................................................................63Update account.............................................................................................................................. 64Restart account...............................................................................................................................64Get config file..................................................................................................................................65Save config file................................................................................................................................65Get log entries.................................................................................................................................66Get log errors.................................................................................................................................. 66Get status of performance statistics logger..................................................................................67Start performance statistics logger...............................................................................................67Stop performance statistics logger............................................................................................... 68Get API process information..........................................................................................................68Set logging level............................................................................................................................. 69Get call stack...................................................................................................................................69Get Connection Manager status.................................................................................................... 70Get user........................................................................................................................................... 70Get session ID................................................................................................................................. 71
Connection Manager Admin API Server models.......................................................................................71Account............................................................................................................................................72Response entity.............................................................................................................................. 73Config...............................................................................................................................................74CmAccount...................................................................................................................................... 75ModelMap........................................................................................................................................ 76Collection<<Account>>...................................................................................................................76Environment variable..................................................................................................................... 76CmPerfStats.................................................................................................................................... 76CmStatus......................................................................................................................................... 77CmStats........................................................................................................................................... 77CmLog..............................................................................................................................................77
Contents
6
API GET example.........................................................................................................................................78
Chapter 12: Troubleshooting............................................................................................................................................. 80Troubleshooting client logging issues.................................................................................................................. 80
Setting up the local log folder to produce a client log file...................................................................... 80Troubleshooting Java Scheduler issues............................................................................................................... 81
Starting the Java Scheduler in the rbexamples account.........................................................................81Updating the number of webshares......................................................................................................... 82
Appendix A: Configuration files......................................................................................................................................... 83JavaScheduler.ini file............................................................................................................................................. 83
Sections of the JavaScheduler.ini file.......................................................................................................84[LogLevel] section...........................................................................................................................84[Default] section..............................................................................................................................84[account] section............................................................................................................................ 86
rgw5.ini file..............................................................................................................................................................88Sections of rgw5.ini file..............................................................................................................................89
[LogLevel] section...........................................................................................................................89[Default] section..............................................................................................................................90[accountname] section...................................................................................................................90
The application.properties file.............................................................................................................................. 92
Appendix B: Error codes.....................................................................................................................................................96Error codes.............................................................................................................................................................. 96
7
Chapter 1: Rocket U2 Web DevelopmentEnvironment overview
Rocket U2 Web Development Environment (Web DE) is an application development toolkit for buildinginteractive client/server applications for deployment on the World Wide Web or on a corporateintranet.
IntroductionThis manual explains how to create a Web DE-enabled U2 account, set up an application module,create and maintain users, and manage garbage collection. Other subjects include licensing,concurrency control, managing the Java Scheduler, and revision control.
Web DE componentsWeb DE consists of the RedBack Object Server, Java Scheduler, RedBeans and RedPages.NET, andWeb Designer.
The following table describes the role of each Web DE component.
Table 1: Web DE components
Component Description
RedBack ObjectServer
The RedBack Object Server manages access to RedBack applications andimplements dynamic runtime interfaces to server-side application resources.
The RedBack Object Server also maintains the repository that contains all thedefinitions and code that define an application.
Java Scheduler(ConnectionManager)
The Java Scheduler manages data transfer between the RedBack ObjectServer and the web server, handling requests from RedBeans andRedPages.NET. It also performs the job of load balancing, processing thequeue of connection requests by allocating U2 licenses as webshares.
Admin API Server The Admin API web server hosts a Web API and accompanying Web UI for JavaScheduler (Connection Manager) administration.
RedBeans andRedPages.NET
The RedBeans and RedPages.NET components are the Java and .NETapplication programming interfaces (APIs) that enable you to connect yourapplication to RedBack Objects (RBOs). These components are the interfacebetween the web server and the RedBack Object Server. The role of thesecomponents is to establish and maintain connection pool connections orwebshare connections between the web server and the RedBack ObjectServer.
Web Designer This suite of designer tools runs in an Eclipse development environment andprovides an interface for designing RBOs. For more information, see WebDesigner User’s Guide.
8
Chapter 2: Creating a Web DE-enabled U2account
Creating and setting up a Web DE-enabled U2 account on a Windows- or UNIX-based U2 servercomputer involves the following tasks:
▪ Creating a U2 server definition, on page 8
▪ Editing a U2 server definition, on page 9
▪ Connecting to a U2 server, on page 9
▪ Disconnecting from a U2 server, on page 9
▪ Creating a U2 account, on page 10
▪ Enabling an account for U2 Web DE, on page 10
▪ Editing the configuration files, on page 11
Creating a U2 server definitionU2 databases are not recognizable by the Web Designer by default. On any U2 database servercomputer that is to host U2 accounts, you must create a U2 server definition in Web Designer. Afteryou create the server, it appears in the U2 Resource view.
Prerequisites▪ Install Web DE as described in Installation and Configuration.
▪ Deploy the RedBack Object Server to a UNIX or Windows computer as described in Installation andConfiguration.
Procedure
1. Open Web Designer by clicking Start → All ProgramsRocket U2 → Web DevelopmentEnvironment → U2 Web Designer.
2. From the U2 Resource view, right-click Servers and select New U2 Server.3. In the Create a New U2 Server window, enter the name and host of the server.
Note: The name must be unique and cannot contain a slash (/) or backslash (\) character. Youcannot change the name of the server later, so be sure that the name you choose is the oneyou want.The Host field is the name or IP address of the computer on which the U2 database server isrunning.
4. Select UniData or UniVerse, depending on the database you use.5. Optional: Click Advanced to define more details for the U2 server.
Tip: Accept the default settings unless you understand the effect of the changes you aremaking.
a. In the RPC Port# field, enter the port number of the UniRPC server running on the host. Thedefault port number is 31438.
Editing a U2 server definition
9
b. In the RPC Service Name field, enter the name of the remote procedure call (RPC) service onyour system. For UniData, this name is udcs; for UniVerse, this name is uvcs.
c. In the Login Account field, enter the full path to the account folder on the server to whichyou want to log on when accessing UniData or UniVerse. You can enter just the accountname if the account is defined in the UD.ACCOUNT file or the UV.ACCOUNT file.
d. In the Commands to Execute group box, if you want to execute a RetrieVe command, a savedparagraph, or a globally cataloged program, click Add. In the window that appears, enter theRetrieVe command, saved paragraph name, or globally cataloged program name, and clickOK.The command appears in the group box.
e. Next to Protocol, select Telnet or SSH.f. In the Port Number field, enter the port number used for Telnet or SSH communications.
The default Telnet port number is 23; the default SSH port number is 22.g. Click Finish to return to the main Create a New U2 Server window.
6. Click Finish to create the U2 server.
Editing a U2 server definitionIf any of the information for the server is incorrect or needs to be changed, you can edit the serverdefinition.
1. From the U2 Resource view, right-click the server and select Properties.
The Edit U2 Server Definition window contains the same details as the Create a New U2 Serverwindow, described in the preceding steps, allowing you to edit any fields you need. As previouslystated, the Name field is not editable. However, you can right-click the server and select Delete,and create it again using a new name.
2. Change any of the fields and options, and click Finish.
Connecting to a U2 serverThe U2 Resource view displays a list of all U2 servers that have been defined in Web Designer. After youconnect to a U2 server, the U2 Resource view displays the accounts and cataloged programs on the U2server to which you are connected. You can connect to any U2 server on the list in this view.
Prerequisites▪ Creating a U2 server definition, on page 8
Procedure
1. From the U2 Resource view, double-click the name of the U2 server to which you want to connect.2. In the Connect to a U2 Server window, enter your user ID and password.3. If you are using a proxy server, select the Use Proxy Server check box, and enter the proxy host
and port.4. Click Connect.
Disconnecting from a U2 serverDisconnecting from a U2 server only closes the connection and frees up the license; it does not deletethe U2 server definition or remove it from the list in the U2 Resource view. You can connect to the U2server again by double-clicking the server name and entering your credentials. You do not have to
Chapter 2: Creating a Web DE-enabled U2 account
10
disconnect from one U2 server before connecting to another. You can have connections open to two ormore U2 servers at the same time. However, each open connection consumes a U2 database license.
From the U2 Resource view, right-click the server and select Disconnect.
Creating a U2 accountAfter you connect to the U2 server that is to store a new account, the next task is to define a U2account. The U2 account acts as a container for a group of modules that store RBO definitions for arelated purpose or business activity. After an account is created, the U2 Resource view displays it inthe Accounts folder.
Prerequisites▪ Connecting to a U2 server, on page 9
Important: When you increase the number of accounts, the load on the RedBack Object Serverand the web server might increase, potentially slowing down any connections.
Procedure
1. From the U2 Resource view, right-click Accounts and select New U2 Account.2. In the Create New U2 Account window, enter the following information:
a. In the Select U2 server area, the U2 server to which you are connected is selected by default.If you are currently connected to more than one U2 server, you can select a different U2server on which to create the account.
b. Enter the account name and path.
The account name must be unique to the U2 server. The account path defaults to the homedirectory. Click Browse to select a different location.
▪ If you are adding an account for UniData, the name that you specify is also entered in theUD.ACCOUNT file on the server.
▪ If you are adding an account for UniVerse, the name that you specify is also entered in theUV.ACCOUNT file on the server.
If the account is for UniVerse, an Account Flavor drop-down menu appears.
Web DE-enabled U2 accounts must be Pick-compatible; however, the files that Web DEaccesses may reside in any type of account, as long as there is a valid file pointer to the file.
Select the flavor of UniVerse to use, and optionally select the Use Default Login check box.3. Click Finish.
Enabling an account for U2 Web DEYou must enable any new or existing U2 account for Web DE before you can develop RBOs for theaccount in the Web Designer. You can enable any U2 account that is on the U2 server computerto which you are connected. After the account is enabled, in the U2 Resource view, a U2 Web DEElements node is added to the account.
Editing the configuration files
11
Prerequisites▪ Creating a U2 account, on page 10
▪ If you upgraded to a new version of RedBack Object Server, be sure that the rbdefn accountreferenced in the account list is the correct (new) rbdefn account.
About this task
The enablement process gathers information about the RedBack Object Server from the rbdefnaccount. If the rbdefn account is in the account list for the selected U2 server, it is used as the source ofthe RedBack Object Server pieces required to enable the account for Web DE. If no account is named“rbdefn” in the account list, you are prompted to specify the location of the rbdefn account on theserver. The rbdefn account is then added to the account list.
Procedure
1. From the U2 Resource view, expand Accounts, right-click the account you want to enable, andselect Enable for U2 Web DE.
2. If the rbdefn account is not already defined, you might be prompted to enter or browse to thepath of the rbdefn account.
Figure 1: Establish link to rbdefn account
If the enablement process is successfully completed, the message “Enable account for U2 Web DEwas successful for account: accountname” is displayed.
Tip: If you are not sure whether an account is enabled, check for the U2 Web DE Elements node inthe account’s tree view.An account that is already enabled for Web DE can be enabled again. This is useful if you install anew version of the RedBack Object Server, especially if the location or path of the rbdefn accounthas changed.
Editing the configuration filesAfter creating a U2 account and enabling it for Web DE, you must insert a reference to the account inthe configuration files.
The following sections describe how to edit the JavaScheduler.ini file and the rgw5.ini file.
▪ Inserting an account reference in the JavaScheduler.ini file, on page 12
▪ Inserting an account reference in the rgw5.ini file, on page 14
▪ Editing the rgw5.ini file on a remote web server, on page 15
Chapter 2: Creating a Web DE-enabled U2 account
12
Inserting an account reference in the JavaScheduler.ini file
After you create a new U2 account and enable it for Web DE, you must modify theJavaScheduler.ini file. The JavaScheduler.ini file sets configuration information for theJava Scheduler and is used as a reference to the location of each U2 account.
Prerequisites▪ Enabling an account for U2 Web DE, on page 10
Note: The Java Scheduler configuration file, JavaScheduler.ini, is in the directory specifiedby the U2WDE environment variable. For additional information about the JavaScheduler.inifile, see JavaScheduler.ini file, on page 83.
Procedure
1. From the Tools menu, select Edit Java Scheduler Configuration.2. In the Open window, browse to the C:\U2\U2WDE directory and double-click the
JavaScheduler.ini file.3. In the JavaScheduler.ini tabbed page, add an account to the JavaScheduler.ini file:
a. Maximize the JavaScheduler.ini tabbed page.b. Right-click in any empty cell and select Insert Account.
In the “Establish server details for this account connection” page of the account editorwizard, enter the server details for the account connection.
Table 2: Server parameters
Field Description
Account name Enter the name to use for this account section in theJavaScheduler.ini file. This name is typically the same as theaccount name that has been assigned to the account.
Server Enter the name or IP address of the RedBack Object Servercomputer for this account.
Server Type Select the type of U2 data server running on the RedBack ObjectServer computer: UniData or UniVerse.
c. To test the settings that are entered for connection parameters, click Test ConnectionSettings.If the connection fails, make changes to correct the error condition and test again.
d. In the Scheduler to Database Connections area, enter or select the minimum and maximumnumber of pooled connections available to the account.
e. To modify the account’s connection pool parameters, click Next and enter details in the“Establish account connection details” page in the wizard.
Table 3: Connection pool parameters
Parameter Description
Idle RemoveThreshold
To set an idle remove threshold parameter for the account, selectthe Idle Remove Threshold check box. In the field, enter or selectthe number of milliseconds that a connection pool thread canremain idle before it is flagged for removal.
Inserting an account reference in the JavaScheduler.ini file
13
Parameter Description
Idle Remove ExecInterval
To set an idle remove execution interval for the account, select theIdle Remove Exec Interval check box. In the field, enter or selectthe number of milliseconds of the interval at which connectionsthat have been flagged for removal are removed. The sessions willbe removed until the pool reaches the minimum connection poolamount.
Open session To set an open session parameter for the account, select theOpen session check box. In the field, enter or select the number ofmilliseconds to acquire a session from the connection pool beforetiming out.
f. To modify optional parameters for the account, click Next and complete the “Set optionalaccount and connection properties” page in the wizard.
Table 4: Optional parameters
Parameter Description
Deactivate account To deactivate the U2 account, select this check box. You can clearthe check box to reactivate the account later, if needed.
Deactivating a U2 account prevents it from consuming server orconnection pooling licenses. It disables use of the account’s RBOs inweb applications and in the RBOScope testing tool. However, userscan access a deactivated account from the U2 Resource view andwork with its RBOs in the RBO Editor.
Enable SSL forthis account’sconnection(s) toserver
To use the SSL protocol when making connections to the U2 server,select this check box.
Enable server-sidelogging for thisaccount
Specifies whether to save the server logs to the account _PH_ filein UniData or the &COMO& file in UniVerse.
Create theuoj_trace.log file
To keep a log of UOJ processes for the account, select this checkbox.
Enable tcp keepalive for accountthreads
To keep alive scheduler threads that take client requests, select thischeck box.
Enable schedulerdeveloper mode forthis account
Automatically resets all available connections in the connectionpool to load source code that has been created or modified.
g. To modify the monitor parameters for the account, click Next and complete the “Establishmonitor warning thresholds” page in the wizard.
Table 5: Monitor threshold parameters
Parameter Description
Average ResponseTime
Triggers monitor warnings when the overall average requestresponse time exceeds these values. The average covers the periodsince the Connection ManagerScheduler was last started. Selectthe amount of milliseconds for when to trigger yellow and when totrigger red.
Chapter 2: Creating a Web DE-enabled U2 account
14
Parameter Description
Average ResponseTime Interval
Triggers monitor warnings when the average request response timeexceeds these values. The average covers a single monitor refreshinterval. Select the amount of milliseconds for when to triggeryellow and when to trigger red.
Account RequestsQueued
Triggers monitor warnings when the number of requests waiting tobe served exceeds these values. Select the amount of millisecondsfor when to trigger yellow and when to trigger red.
Slow Process Time Triggers monitor warnings when any requests exceeds this value.Select the amount of milliseconds for when to trigger red.
h. Click Finish.4. In the JavaScheduler.ini tabbed page, review the changes in the new account section and make
corrections if necessary.5. To save the changes to the JavaScheduler.ini file, select File → Save.
Inserting an account reference in the rgw5.ini file
After you create a new U2 account and enable it for U2 Web DE, modify the rgw5.ini file. TheRedBack gateway components, which run on the web server or the client, use the rgw5.ini file as areference to the location of each U2 account or as a reference to the computer and port number of theJava Scheduler.
Prerequisites▪ Enabling an account for U2 Web DE, on page 10
Note: The gateway configuration file, rgw5.ini, is in the directory specified by the U2WDEenvironment variable. For additional information about the rgw5.ini file, see rgw5.ini file, onpage 88.
Procedure
1. From the Tools menu, select Edit Gateway Configuration.2. In the Open window, browse to the C:\U2\U2WDEnnn directory, where nnn is the version
number you installed, and double-click the rgw5.ini file.On UNIX computers, the rgw5.ini file must be created manually or created on your local clientand then copied to a UNIX system. The preferred location for this file is in the /etc directory.
3. In the rgw5.ini tabbed page, add an account to the rgw5.ini file as described in step 3 ofInserting an account reference in the JavaScheduler.ini file, on page 12.
4. In the rgw5.ini tabbed page, review the changes in the new account section and makecorrections, if necessary.
5. To save the changes to the rgw5.ini file, select File → Save.
Editing the rgw5.ini file on a remote web server
15
Editing the rgw5.ini file on a remote web server
Encrypting a password
When deploying a Web DE application to a web server, you need to establish the rgw5.ini file onthat server. While rgw5.ini does support unencrypted passwords, having a plain-text passwordson a server is not secure. Previously, to encrypt the password, you had to use the Web Designer to editthe rgw5.ini file, save it locally, then deploy it to the server. Now, you can edit the rgw5.ini fileoutside of Web Designer, and use a command to encrypt the password and send it back to the webserver without interacting with the Web Designer.
Prerequisites
Before you can encrypt plain-text passwords in the rgw5.ini file on a remote web server, you musthave a v5.2.0 or higher of RedBeans.jar, and Java 6 or higher installed on the remote web server.
To edit and encrypt plain text passwords in the rgw5.ini file, perform the following steps:
Procedure
1. Open the rgw5.ini file in text editor on the remote web server.2. Enter one or more plain-text passwords, and save the file.3. Open a command prompt, and run the following command:
java -cp /path/to/RedBeans.jar com.rs.u2.wde.redbeans.VerifyIni ./rgw5.ini
The password encrypts in the rgw5.ini file.
16
Chapter 3: Setting up application modulesA RedBack module is a repository for all the RBO class definitions that relate to a convenient grouping,such as a particular business activity. A Web DE-enabled U2 account can have several modules, eachof which is a container in which to group related RBOs.
For example, a factory might want to create the following modules:
▪ Stock Control
▪ Accounts
▪ Human Resources
All the RBOs for the stock control system would be stored inside the Stock Control module.
Creating a moduleAfter you connect to a U2 server, you can create a module in a Web DE-enabled account on that U2server. When you create a module, the module is added to the account’s U2 Web DE Elements node inthe U2 Resource view.
Prerequisites▪ Connecting to a U2 server, on page 9
▪ Enabling an account for U2 Web DE, on page 10
Procedure
1. From an expanded Web DE-enabled account, double-click the U2 Web DE Elements node.
Deleting a module
17
2. In the RedBack Object Server Connection wizard, enter your user name and password, and clickFinish.
The default user name of the administrator is rbadmin, and the default password is redback. Forincreased security, change the default password as described in Viewing, editing, or deleting auser, on page 28.
When the connection to the RedBack Object Server opens, the U2 Web DE Elements tree displaysone or more modules.
Figure 2: Modules
3. Right-click U2 Web DE Elements and select New Module.4. In the New Module dialog box, enter a name and description for the new module, and click OK.
Note: Module names are case-sensitive and cannot contain spaces.
The module appears in the U2 Web DE Elements tree. You might have to right-click U2 Web DEElements and select Refresh to see the new module.
Deleting a moduleYou can delete a module from within the Web Designer.
Warning: Deleting a module deletes all RBO and logical file data that is defined within the module.You cannot undo the module deletion.
1. Expand the U2 Web DE Elements tree, right-click a module, select U2 Web DE Elements, andthen select Delete.
2. In the Delete Module dialog box, click Yes.You might have to right-click U2 Web DE Elements and select Refresh to confirm that the modulehas been deleted.
18
Chapter 4: Creating filesIn the Web Designer, you can create U2 database files to store your data.
Creating U2 database filesEach account has a Database File node that you use to create new U2 database files.
Prerequisites▪ Connecting to a U2 server, on page 9
▪ Enabling an account for U2 Web DE, on page 10
▪ Creating a module, on page 16
Procedure
1. From an expanded Web DE-enabled account, expand the Account node, and expand the tree forthe account in which you want to create a U2 database file.
2. From the Database Files node, select New U2 File.3. In the Create a New U2 File wizard, select the parent account for the new file and enter a name for
it.
The current account is selected by default; however, you can select a different account on theserver to which you are currently connected, if necessary.
To continue, click Next.4. In the “U2 file options” page of the wizard, enter the information to create a new U2 file. The page
is different for UniData and UniVerse, so choose the appropriate option:
▪ For UniData, use the following table to enter file information.
Table 6: UniData file options
Field or Option Description
File Type Select the type of database file that you want to create:
▪ Hashed – UniData hashed file: a binary file that consists of a fileheader and one or more groups of data.
▪ DIR – UniData directory file: a directory that contains text or datafiles, and each text or data file is a UniData record.
▪ MULTIDIR – UniData multilevel directory (LD-type) file: a system-leveldirectory that contains one or more subdirectories (UniData DIR typefiles).
▪ MULTIFILE – UniData multilevel (LF-type) file: a directory thatcontains one or more UniData hashed files that share a commondictionary.
For more information about each file type, see “UniData File Types” inUsing UniData.
Modulo The number of data groups in the file. Applicable only to Hashed andMULTIFILE file types.
Creating U2 database files
19
Field or Option Description
Block Size The block size of data groups in the file. Applicable only to Hashed filetypes.
Hash Type Select one of the following options:
▪ 0 – Static hashing with fixed modulo
▪ 1 – Dynamic hashing with changing modulo
If applicable, select the Dynamic File check box to create the hashedfile as a UniData dynamic file. A dynamic file resizes itself by changingthe number of groups required to store records. When records are addedand deleted, dynamic files grow and shrink as the modulo (number ofgroups) changes.
If applicable, select the RFS File check box to create the file as a UniDatarecoverable file, subject to the backup and recovery features of theUniData Recoverable File System.
▪ For UniVerse, select Static or Dynamic.A static file does not change in size to accommodate changes in the amount of data stored init. A dynamic file resizes itself by changing the number of groups required to store records.For static files, use the following table to enter file information. For dynamic files, use Table 8:UniVerse dynamic file options, on page 21.
Chapter 4: Creating files
20
Table 7: UniVerse static file options
Field or Option Description
Select the type of database file that you want to create:1 A UNIX directory. Sub-UFD type file, for large records or source
code.2 Hashed file. Keys end with numbers.3 Hashed file that uses numeric keys with separators. Keys end
mainly with numbers.4 Hashed file that uses 64-character ASCII keys. Keys end with
letters.5 Hashed file that uses 256-character ASCII keys. Keys end with full
range of ASCII characters.6 Hashed file. Keys begin with numbers.7 Hashed file that uses numeric keys with separators. Keys begin
mainly with numbers.8 Hashed file that uses 64-character ASCII keys. Keys begin with
letters.9 Hashed file that uses 256-character ASCII keys. Keys begin with full
range of ASCII characters.10 Hashed file. Keys are all numeric.11 Hashed file that uses numeric keys with separators. Keys are
mainly numbers.12 Hashed file that uses 64-character ASCII keys. Keys are letters.13 Hashed file that uses 256-character ASCII keys. Keys are full range
of ASCII characters.14 Hashed file. Keys are all numeric.15 Hashed file that uses numeric keys with separators. Entire keys are
mainly numbers.16 Hashed file that uses 64-character ASCII keys. Entire keys are
letters.17 Hashed file that uses 256-character ASCII keys. Entire keys are full
range of ASCII characters.18 Hashed file. Entire keys are of arbitrary form.19 A UNIX directory. Sub-UFD type file, for large records or source
code.
Type
25 A B-tree file. Best for a large file with small static records.Modulo The number of data groups in the file. The number must be a positive
whole number.Separation The block size of data groups in the file. Select an integer from 1 through
32 specifying the group buffer size in 512-byte blocks.
If you want to create a 64-bit file on a UniVerse system that uses 32-bitfile systems, select the 64-bit check box.
Creating U2 database files
21
Table 8: UniVerse dynamic file options
Field or Option Description
Minimum Modulo Specify the initial value of the modulo of the dynamic file as a positivewhole number. The default value is 1.
Group Size Select one of the following options:
▪ 1 – Group size of 2048 bytes, which is equivalent to a separation of 4.
▪ 2 – Group size of 4096 bytes, which is equivalent to a separation of 8.
The default value is 1.Large Record Specify the maximum size of a record to include in the primary group
buffer, expressed in bytes. This value must be a whole number.
When the size of a record exceeds this value, its data is placed in anoverflow buffer, but the record ID is placed in the primary group buffer.This method of large record storage increases access speed.
The default value is 1628 bytes.HashingAlgorithm
Select one of the following options:
▪ GENERAL – The default hashing algorithm, suitable in most cases.
▪ SEQ.NUM – A hashing algorithm for sequential numbers. Useonly for records with IDs that are mainly numeric, sequential, andconsecutive.
Split Load % Specify the percentage of allocated file space at which the dynamic file’smodulo is to be increased by 1. This value must be a whole number.When the data in the file exceeds this percentage, the data in one of thegroups is divided equally between itself and a new group, increasing themodulo by 1. The default percentage is 80.
Merge Load % Specify the percentage of allocated file space at which the dynamic file’smodulo is to be decreased by 1. This value must be a whole number.
When the data in the file uses less than this percentage, the data inthe last group in the file is merged with another group, decreasing themodulo by 1.
The default percentage is 50.
If you want to create a 64-bit file on a UniVerse system that uses 32-bitfile systems, select the 64-bit check box.
Chapter 4: Creating files
22
5. Click Finish.The database file is added to the to the account under which it was created. The dictionary opensin the D_filename tabbed page, where filename is the name of the file that you just created. In thefollowing figure, “test” is the new file.
Figure 3: New file
23
Chapter 5: Managing garbage collectionBecause there is no permanent connection between your browser and the RedBack Object Server,Web DE stores data between web requests for a session and other information for RBOs in theWWSTATE file. The session information consists of details about the user and objects that have beeninstantiated. When sessions become inactive, garbage collection uses a background phantom processto automatically expire or purge them to allow for better performance with the WWSTATE file. Garbagecollection can quickly clear out all state items from an expired session, rather than remove items oneby one.
Starting phantom controlGarbage collection runs in the background as a phantom process. You can modify how frequently youwant sessions to expire and how often you want to purge these expired sessions. The Garbage Collecttab allows you to manage all garbage collection properties.
The purpose of purging your sessions is to provide better performance for your application. Thelarger the WWSTATE file is, the slower Web DE runs. Setting up frequent expiring and purging times isrecommended.
1. To open the Garbage Collect tab, from an expanded Web DE-enabled account, right-click U2Web DE Elements and select Manage Garbage Collection.The Editor pane of the Web Designer opens with the Garbage Collect tab displayed.
Figure 4: Garbage Collect tab
2. By default, the garbage collection rules are set to expire sessions every 2 hours, and then removeany expired sessions every hour. If the default rules from the Preferences section are acceptable,continue to step 3. If not, change the preferences as described below.
Chapter 5: Managing garbage collection
24
▪ Rules for Expiring Inactive Sessions – These fields allow you to establish how long a websession can remain inactive before it expires. When you have sessions older than the timeselected, the garbage collector expires them, but they remain in the WWSTATE file in case thesession is reinstated. Adjust the days, hours, and minutes fields to when you want sessions toexpire.
▪ Rules for Purging Expired Sessions – After sessions expire, this rule defines how often topurge sessions from the WWSTATE file. Adjust the days, hours, and minutes fields as youneed.
To save the changes to the garbage collection preferences, select File → Save.3. Click Start Phantom.
Viewing the logWhen you run the phantom control for garbage collection, a log is kept of when and how manysessions have been purged. You can refresh, clear, or change the maximum amount of records todisplay in the log.
The right section of the Garbage Collect tab contains a logging section as shown in the followingfigure.
Figure 5: Logging section
1. To change the limit of the amount of log data to retrieve from the server, set the number in theMaximum records to fetch spinner control to a higher or lower number. The default value is 500log records, meaning the 500 newest log records are retrieved from the server.If you need to see data older than these 500 records, you can set the number higher. If there aremore records on the server than the limit specifies, an informational message is displayed at thetop of the tab, noting that the maximum record count can be increased to show more data.
2. Click Get Logs to retrieve the log data.When the phantom process has been started, the button label changes to Refresh, as shown inthe preceding figure.
Stopping the phantom control
25
3. Expand the various nodes in the tree view to see more detail about each garbage collection run.Garbage collection logs are ordered by week.
4. Click Clear Log Data to clear the data from the WWLOG file on the connection’s rbdefn account.
Stopping the phantom controlIf you no longer need the phantom control to run automatically, you can stop it.
From the Garbage Collect tab, click Stop Phantom.
Running garbage collection without the phantomIf you do not need to run garbage collection automatically, you can run the process manually.However, if the phantom process is currently running, you must stop it first before running garbagecollection manually.
Note: It is not recommended to run garbage collection manually as the process may take awhile.Running garbage collection with the phantom process is the preferred method. See Startingphantom control, on page 23.
1. From the Garbage Collect tab, click Run GC Now.2. In the Run Garbage Collection Now dialog box, click Yes to accept the warning message that the
process may take extra time.
State managementAs part of the state file management system, a session repository called WWSESSION contains a listof the state (WWSTATE) items created for each session, as well as a list of saved lists (SAVEDLISTS onUniData and &SAVEDLISTS& on UniVerse).
The date and time is stored and updated every time a session-related state item or saved list iswritten. Garbage collection uses the last update date and time in WWSESSION to determine whether asession has expired. If the session is expired, Web DE deletes the entire list of state and saved list itemswithin the session item. This provides a much quicker and cleaner method to clean WWSTATE.
By default, state management functionality is disabled. To enable it, set the value of the WWSESSIONenvironment variable to 1 in the JavaScheduler.ini file, for example:
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamplesMinimumPoolSize=1MaximumPoolSize=10ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostcomo=1usingssl=0
[rbexamples.Environment]account_desc=rbexamples GMTTZ=GMT
Chapter 5: Managing garbage collection
26
WWSESSION=1
WWSTATE file size guidelinesThe size of the WWSTATE file is highly application-dependent. The larger the WWSTATE file, the longerthe garbage collection process will take. In most cases, a database administrator must resize theWWSTATE file. However, you can determine if resizing needs to take place.
For more specific steps, refer to Administering UniVerse on Windows Platforms or AdministeringUniVerse on UNIX Platforms.
Use the following factors as guidelines to determine the optimal size of the WWSTATE file:
▪ The number of hits your site receives each day
▪ The length of a session
▪ The specifications of the computer on which the RedBack Object Server is running and the load onthe computer at various times of the day
▪ The amount of information the application itself is putting into the WWSTATE file, in addition to thedefault system information that Web DE requires
If you have a small site with fewer than 100,000 hits per day, a WWSTATE file with a modulo of 7517and a block size of 1024 might be sufficient. You can schedule garbage collection to run four to eighttimes per day.
If you have a larger site with up to one million hits per day, you can size this file with a modulo of 65521and a block size of 2048. You can schedule garbage collection to run every 15 minutes to clear itemsolder than 30 minutes. Be cautious when setting cleanup intervals of items as low as 30 minutes,because some valid state objects could be deleted for those users who browse longer than 30 minutes.
It is very important that a database administrator regularly monitor the WWSTATE file to ensure thatthe size of the file is optimized for performance.
WWSESSION file size guidelinesThe size of the WWSESSION file is highly application-dependent. The file will hold one record foreach unique session stored in WWSESSION with a list of the individual records associated with eachsessions and is used to speed up the process of garbage collection.
In most cases, a database administrator must resize the WWSESSION file in conjunction withthe WWSTATE file. However, you can determine whether resizing needs to take place. For morespecific steps, refer to Administering UniVerse on Windows Platforms or Administering UniVerse onUNIX Platforms. You should use the same factors considered in sizing WWSTATE when sizing theWWSESSION file.
As a general guideline, the size of the WWSESSION file would be proportional to the size of WWSTATEand the two files would be jointly resized as needed. It is very important that a database administratorregularly monitor the WWSTATE file to ensure that the size of the file is optimized for performance.
27
Chapter 6: Managing usersThe Users tab allows you to manage and create user records, adding users to groups and optionallyenabling users to integrate SB/XA with Web DE. You can list users, edit user records, and delete users,as needed.
Creating a Web DE userWhen you create a user, you are giving the user access to the RedBack Object Server from the WebDesigner. You can also optionally assign a user to a specific group and grant SB/XA access.
1. To open the Users tab, from an expanded Web DE-enabled account, right-click U2 Web DEElements and select Manage RedBack Users.The Editor pane of the Web Designer opens with the Users tab displayed.
Figure 6: Users tab
2. Enter the information for the new user.3. From the User Group drop-down list, select one of the following options:
▪ ROOT: The administrative group, in which all members have full privileges. Members canmodify details of other users, as well as create and delete users.
▪ USERS: The default group to which most users belong. Members can modify only their owndetails.
4. Optional: In the SB+ Access area, select the Enable SB+ Access check box, and enter the pathto the SB/XA account in the dialog box that appears. The SB+ User ID field becomes available foryou to enter the user ID when the correct SB/XA account path is entered.
Note: If a Web DE user wants to integrate SB/XA with Web DE, the SB+ Access check box mustbe selected for the user to access the SB/XA server. For more information, see Web DesignerUser’s Guide.
5. To save the new user, select File > Save.
Chapter 6: Managing users
28
Viewing, editing, or deleting a userA list view is provided for you to view, edit, or delete Web DE users.
1. From the Users tab, click List Users.2. From the user list, select a user to view, edit, or delete, and click OK.3. Do one of the following actions:
▪ To edit the user, change any fields necessary and select File → Save.
▪ To delete the user, click Delete User. Deletions cannot be undone.
Application security and Web DEWeb DE provides security to control who has access to an account's RBO definitions from WebDesigner and the RBOScope testing tool. Web DE does not provide security options for the applicationitself.
The application may require a number of different security aspects such as secure pages (SSL), webserver access control, and application access. The following table describes each of these aspects.
Table 9: Security aspects
Type of security Description
SSL SSL (Secure Sockets Layer) is the standard security technology for establishingan encrypted link between a web server and a browser. This link ensures that alldata passed between the web server and browsers remain private and integral.SSL is an industry standard and is used by millions of websites in the protectionof their online transactions with their customers.
SSL is controlled from the client navigation. By calling a page through theHTTPS protocol and configuring a secure web server, Web DE sends encrypteddata between the browser and Web server. This is an area of security handledby the browser and the web server, and therefore is beyond the scope of thismanual.
Web server accesscontrol
Web servers allow security to control access. This is a technique often used tocontrol access to the Web server, and therefore the pages on that web server.For details about setting up access control, see your web server documentation.
Application access Through your application code, you can prompt for a user name and password,and then determine if that user should have access to the requested RBO. Theuser details and access rights are part of your application data, and you mustdetermine what level of control to impose. Web DE security does not apply toapplications and cannot be used to control application access.
Application security and Web DE
29
Type of security Description
PCI DSSCompliant
The PCI-DSS (Payment Card Industry Data Security Standard) is an informationsecurity standard for organizations that handle credit cards, and was created toincrease controls around cardholder data to reduce credit card fraud.
This standard requires strong cryptography and security protocols be usedto safeguard sensitive cardholder data during transmission over open publicnetworks (e.g. the Internet, wireless technologies, cellular technologies, GRPS(General Packet Radio Service), and satellite communications) including:
▪ Only trusted keys and certificates are accepted.
▪ The protocol in use only supports secure versions or configurations.
▪ The encryption strength is appropriate for the encryption methodology inuse.
Important: Web-DE uses the latest security libraries in Java 1.8, which meansthat security protocol of TLSv1.1 and TSL1.2 will meet PCI 3.2 requirements.Early SSL and TLS protocols, such as SSLv2, SSLv3, and TLSv1, should notbe used for secure communication as they will not meet the minimum PCIrequirements.
30
Chapter 7: Restricting administrative views andfunctionality
Often times, it is only appropriate for administrators to see all of the accounts and information ona server and be able to perform administrative tasks, such as setting up new users and deletingaccounts. With Web DE, you can control what users can see and do through subroutines, which are runwhen users connect to the server.
To restrict administrative views and functionality from non-administrative users, create a newsubroutine or edit an existing one, compile it, and globally catalog it. The new subroutine willautomatically run when users connect to the server where the subroutine was cataloged.
Activity logging is also available for troubleshooting purposes. Review the logs to examine serveractivity and determine which options are in effect for the client.
Creating, compiling, and cataloging the subroutineYou can restrict administrative views and functionality by creating or modifying the XTOOLSUBprogram, compiling the subroutine, and globally cataloging it.
About this task
The XTOOLSUB program is a U2 database server-side BASIC program used by a variety of U2 clienttools, including Web DE. This program contains several different files, including XTOOLSUB_XPREand XTOOLSUB_EXECPRE, which control pre-execution functionality, and XTOOLSUB_XPST andXTOOLSUB_EXECPOST, which control post-execution functionality.
You might already have XTOOLSUB installed. If not, you can install a new version or create a new onealtogether.
Note: This chapter provides an overview of the process, intended for advanced users. For detailsregarding the XTOOLSUB program, refer to DBTools User Guide.
Procedure
1. Locate the program files or create new files, using the Basic Developer Toolkit or your favorite texteditor.For UniVerse:▪ XTOOLSUB_XPRE
▪ XTOOLSUB_XPST
For UniData:▪ XTOOLSUB_EXECPRE
▪ XTOOLSUB_EXECPOST2. Edit the subroutines, as appropriate.
The following tables explain the incoming and outgoing arguments.
Incoming argument Incoming value Description
X_CODE 99001 Controls whether to treat theconnected user (server-side log-in)as an administrative user.
Creating, compiling, and cataloging the subroutine
31
Incoming argument Incoming value Description
99002 Controls the U2 activity bitmask.X_PARAMS Unused This argument is not used.
Outgoing argument Return value Description
X_ERROR X0: Success
Xn: If n is not 0, an error occurredand X_OUTPUT contains the errordetails message.
If X_CODE was successfullyhandled by this subroutine,XTOOLSUB will not attempt tohandle X_CODE.
X_OUTPUT
if X_CODE = 99001
1 or 0 Returns 1 if the user is anadministrative user.
Returns 0 (zero) if the user is notan administrative user.
X_OUPUT
if X_CODE = 99002
Returns a bitmask of U2 activityoptions:
0: No effect.
1: User can perform administrativetasks.
2: User can only see U2 Web DE-enabled accounts.
4: Show mobility (currently has noeffect).
Returns the sum of selectedoptions, which indicates whatthe user can see and do in theprogram.
For example, 3 indicates the usercan perform administrative tasks,but they can only see U2 Web DE-enabled accounts.
Sample code is shown below, for your reference.
SUBROUTINE XTOOLSUB_EXECPRE(X_CODE, X_PARAMS, X_OUTDATA, X_ERROR)BEGIN CASECASE X_CODE = 99001 * Return a 1 for admin user or 0 for non-admin X_OUTDATA = "0" X_ERROR = "X0" * code to determine if user is admin and if so, set X_OUTOUT to 1 IF @LOGNAME = "jadmin" THEN X_OUTDATA = 1 ENDCASE X_CODE = 99002 * Return a bitmask of U2Activity options * 0 = none (same as it was before changes) * 1 = Enforce Admin * 2 = Show WEBDE/hide other * 4 = Show Mobility X_OUTDATA = "3" ;* Enforce admin user for admin commands AND hide non-WEBDE stuff X_ERROR = "X0"END CASERETURNEND
3. Save your changes.For UniVerse from the TCL prompt:
▪ >ED BP XTOOLSUB_XPRE
For UniData from the ECL prompt:▪ :AE BP XTOOLSUB_EXECPRE
Chapter 7: Restricting administrative views and functionality
32
In these examples, the subroutines were saved in the BP folder.4. Compile the subroutine.
For UniVerse from the TCL prompt:
▪ >BASIC BP XTOOLSUB_XPRE
For UniData from the ECL prompt:▪ :BASIC BP XTOOLSUB_EXECPRE
5. Globally catalog the subroutine.For UniVerse from the TCL prompt:
▪ >CATALOG BP * XTOOLSUB_XPRE XTOOLSUB_XPRE FORCE
For UniData from the ECL prompt:▪ :CATALOG BP XTOOLSUB_EXECPRE GLOBAL FORCE
The new subroutine will automatically run when users connect to the server where the subroutinewas cataloged.
Viewing the activity logActivity logging is available for troubleshooting purposes. Review the logs to examine server activityand determine which options are in effect for the client.
The logs are created in the same folder U2WebDesigner.exe is run. The default is %U2WEBDE%\U2Web Designer.
To turn on the activity log, complete the following steps:
1. From the U2 Resource view, select Window → Preferences.2. In the Preferences dialog, click on UniData/UniVerse on the left side of the pane, select the Turn
on U2 activity logging option, and click OK.
Viewing the activity log
33
Important: This log grows quickly, so turn it off after you collect the information you need.
Log file naming conventions, location, and formats are described below.
Log name format: U2Activity_yyyyMMdd_hhmmss.log
Example: U2Activity_20131203_095332.logLog location: Wherever the U2WebDesigner.exe is located on the client.Log format 1: yyyy-MM-dd,hhmmss.ms,event,message
Example: 2013-12-03,09:53:32.204,LogLevelChange,Logging level set to "ALL"
Log format 2: yyyy-MM-dd,hhmmss.ms,[server] U2ActivityName,message
Example: 2013-12-03,09:54:16.306,[eng46 ud] Deploy toU2 Server,true
A sample log is shown below. Selected options appear in bold for readability purposes.
2013-12-03,09:53:32.204,LogLevel Change,Logging level set to "INFO"2013-12-03,09:53:32.204,LogLevel Change,Logging level set to "ALL"2013-12-03,09:53:33.421,[null] Delete Action,true2013-12-03,09:53:33.437,[null] Create New Account,false2013-12-03,09:53:33.437,[null] Create New Account,handler: com.rs.u2webbuilder.ui.u2resource.u2activity.U2ActivityAdminOnlyEnabler.isEnableReady(): false2013-12-03,09:53:33.437,[null] Enable Account for Web DE,false2013-12-03,09:53:33.437,[null] Enable Account for Web DE,handler:com.rs.u2webbuilder.ui.u2resource.u2activity.U2ActivityAdminOnlyEnabler.isEnableReady(): false 2013-12-03,09:53:33.437,[null] Enable U2 Working Set Menu,false2013-12-03,09:53:33.437,[null] Enable U2 Working Set Menu,handler:com.rs.u2webbuilder.ui.u2resource.u2activity.U2ActivityAllowNonWebdeEnabler.isEnableReady(): false2013-12-03,09:54:16.290,[eng46 ud] Delete Action,true2013-12-03,09:54:16.290,[eng46 ud] WebdeActivitiesUtil.getWebdeOptions()optsMask=32013-12-03,09:54:16.290,[eng46 ud] WebdeActivitiesUtil.isEnforceAdmin(),true2013-12-03,09:54:16.290,[eng46 ud] WebdeActivitiesUtil.isAdminUser(),isAdmin=true2013-12-03,09:54:16.290,[eng46 ud] Create New Account,true2013-12-03,09:54:16.306,[eng46 ud] WebdeActivitiesUtil.getWebdeOptions(),optsMask=32013-12-03,09:54:16.306,[eng46 ud] WebdeActivitiesUtil.isEnforceAdmin(),true2013-12-03,09:54:16.306,[eng46 ud] WebdeActivitiesUtil.isAdminUser(),isAdmin=true2013-12-03,09:54:16.306,[eng46 ud] Enable Account for Web DE,true2013-12-03,09:54:16.306,[eng46 ud] Deploy to U2 Server,true2013-12-03,09:54:16.306,[eng46 ud] WebdeActivitiesUtil.isAdminUser(),isAdmin=true2013-12-03,09:54:16.306,[eng46 ud] Enable U2 Working Set Menu,WebdeActivitiesUtil.isFilterNonWebde() This user is an admin user. No filtering of non-WEBDE elements will take place.2013-12-03,09:54:16.306,[eng46 ud] Enable U2 Working Set Menu,true
34
Chapter 8: Managing concurrency controlThe following sections describe concurrency control in Web DE.
Concurrency control in Web DEWeb DE employs “locks” for concurrency control to prevent developers from accessing and amendingthe same object definition item. Web DE maintains concurrency control information in a file global toall Web DE applications, called WWLOCKS.
When you lock an object, an entry is added to the WWLOCKS file and is not removed until the objectis saved. An entry is also added to the WWSTATE file when you create a new object so that you cancontinue to edit it. The entry is added as soon as the object name is entered.
Note: Concurrency control is available only during application development. It is not used in theapplication run time, where optimistic locking is used instead.
Locking and unlocking an RBO
You must lock an RBO to edit its attributes, properties, or methods. Only one user can lock an RBO ata time. This prevents multiple developers from overwriting each others’ changes. Locking is based onthe full path of the object, meaning that application IDs and account names can be duplicated on aserver, but the object can still be unique. When you lock an object, the definition is downloaded andan entry is created in the WWLOCKS file to indicate that you have opened the object. The RedBackObject Server timestamps the entry in the WWLOCKS file. The entry in the WWLOCKS file remains untilyou close the object or unlock it. When you close the Web Designer, all open objects are closed, andtheir entries are removed from the WWLOCKS file.
Caution: Locking an RBO prevents others from modifying the RBO structure, attributes,properties, and methods when you are working on it, but does not prevent others from editing thesubroutine code. However, if the subroutine is locked at the database level and another developertries to access it, (for example, in the After Effects editor) Web DE will deny them access.
1. From the RBO List, U2 Resource, or RBO Hierarchy view, right-click the name of an RBO and selectLock RBO.
If using the U2 Resource view, you can also press Ctrl to select multiple RBOs to lock.
Alternatively, a Lock icon ( ) is available on the toolbar.
Note: You cannot lock an RBO that is already locked. You can only access a read-only versionof the object definition.
2. Make any changes to the RBO by double-clicking it and editing the details. For more information,see Web Designer User’s Guide.
3. To save the changes, select File → Save.4. To unlock the RBO, right-click it and select Unlock RBO.
Alternatively, an Unlock icon ( ) is available on the toolbar.
35
Chapter 9: Managing revision controlRevision control allows a user-defined subroutine to be run automatically on the RedBack ObjectServer when an RBO definition is read or modified through the Web Designer or the RedBackAPI. You can control access to RBOs during attempted reads, writes, deletions, and handlercompilations. Revision control does not modify or update RBO definitions—this option is up to you,the administrator.
Setting up revision controlTo activate revision control, you must specify the name of the user-defined ‘hook’ subroutine in thefirst attribute of the RB.REVISION.HOOK item. Place this item in the xxTEXT file, where xx is the nameof the module that is subject to revision control. Otherwise, if revision control is to be enforced on allmodules in all accounts, place the RB.REVISION.HOOK item in the global WWCONTROL file.
Web DE calls the user-defined subroutine before the following actions take place:
▪ Read an RBO or BASIC handler of an RBO
▪ Write an RBO or BASIC handler of an RBO
▪ Compile a BASIC handler of an RBO
▪ Delete an RBO
The user-defined subroutine can then terminate the action based on the user who is attempting toperform the action.
The format of the user-defined subroutine statement is as follows:
SUBROUTINE xxx(USERID, FILENAME, ITEMNAME, ITEM, RWDC, ABORT)....
The following table describes each parameter.
Table 10: Subroutine parameters
Parameter Description
USERID Identifies the Web DE user (always in uppercase letters).
This is a read-only parameter that you can use to specify the procedure for theuser-defined subroutine to take based on who is attempting the action.
FILENAME Identifies the file that contains the item being accessed (an RBO or a BASIChandler, for example).
This is a read-only parameter that you can use to determine the action forthe user-defined subroutine to take based on which files are allowed to beaccessed.
The format is [dict]filename.ITEMNAME Identifies the name of the item (for example, RBO name or BASIC handler
name) being accessed.
This is a read-only parameter that you can use to specify the procedure forthe user-defined subroutine to take based on which items are allowed to beaccessed.
Chapter 9: Managing revision control
36
Parameter Description
ITEM The actual item variable (for example, object definition for RBO or handlersource for BASIC handler).
This is a read-only parameter that you can use to determine the action for theuser-defined subroutine to take based on values in the variable.
RWDC Identifies the operation that was performed to initiate revision control.
This is a read-only parameter that you can use to specify the action for theuser-defined subroutine to take based on the initiating operation.
Setting ABORT to 1 rejects the action identified by the RWDC variable anddisplays a revision control message to the user.
The RWDC variable can have one of the following values:
▪ R: indicates a read operation was attempted on an RBO or handler
▪ W: indicates a write operation was attempted on an RBO or handler
▪ D: indicates a delete operation was attempted on an RBO or handler
▪ C: indicates a compile operation was attempted on an RBO handler
Access to a RedBack object through the ASP or Java RBOScope testing toolinitiates the Read RWDC action.
ABORT A write-only parameter that determines whether or not the action identified inthe RWDC variable is rejected. Setting ABORT to 1 indicates the operation willbe rejected.
The user-defined subroutine must be correctly compiled and cataloged.
The following example is of a subroutine:
SUBROUTINE OFFICE.REV.HOOK(USERID, FILENAME, ITEMNAME, ITEM, RWDC, ABORT)* INCLUDE WWINSERT STD.H* IF USERID = ‘FRED’ AND (RWDC = ‘W’ OR RWDC = ‘D’) THEN ABORT = 1 END* RETURN*END
37
Chapter 10: Configuring and running the JavaScheduler
The following sections describe the steps for setting up and getting started managing with the JavaScheduler.
For more information about managing the Java Scheduler, see the Administrator’s Guide.
Managing the Java Scheduler on WindowsThe Java Scheduler can be installed on or deployed to a Windows computer and managed in severaladministration tasks:
▪ Configuring the Java Scheduler (Windows), on page 37
▪ Running the Java Scheduler on Windows, on page 42
▪ Monitoring performance on Windows, on page 44
▪ Registering or unregistering the Java Scheduler as a Windows service, on page 52
Configuring the Java Scheduler (Windows)
Global and account-related parameters provide the settings that the Java Scheduler requires toprocess HTTP requests. After installing Web DE, configure the Java Scheduler by modifying settingswith a wizard in the Web Designer.
Prerequisites
Before you can configure the Java Scheduler, you need to have Web DE installed with the RedBackObject Server and Java Scheduler deployed to a Windows computer. For more information, seeInstallation and Configuration. A U2 server must also be defined, as described in Creating a U2 serverdefinition, on page 8.
Procedure
1. Modifying default global settings (Windows), on page 372. Modifying account settings (Windows), on page 393. Inserting an account in the Java Scheduler configuration file (Windows), on page 42
Modifying default global settings (Windows)
The Default section of the JavaScheduler.ini file contains global parameters that apply to allU2 accounts on the RedBack Object Server computer. Global parameters include connection settingsand credentials, Secure Sockets Layer (SSL) security parameters, and settings for logging errors andwarnings. Modifying the global settings that are used by the Java Scheduler allows you to processrequests for all accounts.
1. On the Windows computer on which Web DE is installed, start the Web Designer.2. In the U2 Resource view, connect to the U2 server on which the RedBack Object Server
component is installed.3. From the Tools menu, select Edit Local Java Scheduler Configuration.
Chapter 10: Configuring and running the Java Scheduler
38
4. From the Open window, browse to C:\U2\U2WDEnnn\JavaScheduler and double-click theJavaScheduler.ini file to open this configuration file in the Editor pane.
5. In the JavaScheduler.ini tabbed page, edit the parameters in the Default section:a. Maximize the JavaScheduler.ini tabbed page and expand the Default section.b. Double-click any property in the Default section and complete the form in the wizard.
In the Server area, enter the details that are required to make connections between the JavaScheduler and the RedBack Object Server.
Table 11: Server parameters
Field Description
Host name or IPaddress
Enter the name or IP address of the RedBack Object Servercomputer.
Server Type Select the type of U2 data server running on the RedBack ObjectServer computer: UniData or UniVerse.
User Enter the operating system-level user ID for the RedBack ObjectServer computer.
Password | VerifyPassword
Enter the password associated with the user ID, and reenter thepassword to verify it.
In the Scheduler area, enter details for the Java Scheduler.
Table 12: Connection parameters
Field Description
Server port Enter the port number on which the Java Scheduler acceptsrequests. Make note of this setting; you need it later when editingthe rgw5.ini file.
Monitor port Enter the port number on which the Java Scheduler accepts monitorand maintenance requests.
Log path Enter the path to the Java Scheduler log (for example, C:\U2\U2WDEnnn\JavaScheduler\JavaScheduler.log).
rbdefn account path Enter the path to the deployed rbdefn account (for example, C:\U2\U2WDEnnn\rbdefn).
c. To test the settings that are entered for connection parameters, click Test ConnectionSettings.If the connection succeeds, the wizard returns the message “Successful connection.” If theconnection fails, make changes to correct the error condition and test again.
d. To modify global settings for Secure Sockets Layer (SSL) processing through the JavaScheduler, click Next and complete the second page in the wizard.
Table 13: SSL parameters
Field Description
SSLkeystore path Enter the path to the SSL keystore for the Java Scheduler.SSLkeystorepassword | Verifypassword
Enter the password for the SSL keystore, and reenter the passwordto verify it.
Enable SSL clientconnections to thescheduler
To allow SSL client applications to make connections to the JavaScheduler, select this check box.
Modifying account settings (Windows)
39
e. To apply the changes, click Finish.f. In the JavaScheduler.ini tabbed page, review the changes in the Default section of the file
and make corrections if necessary.6. To modify global parameters for Java Scheduler logging, in the Logging Settings area at the
bottom of the JavaScheduler.ini tabbed page, select the check box for each type of informationto write to the JavaScheduler.log file.
The following table describes each parameter. Each parameter is selected by default. If you donot want the parameter, clear the check box.
Table 14: Logging settings
Parameter Description
Panic To log unrecoverable errors, select the Panic check box.Error To log serious errors, select the Error check box.Warning To log warning messages, select the Warning check box.Inf To log informational messages, select the Inf check box.Init To log initialization/termination messages, select the Init check box.
7. To save the changes to the JavaScheduler.ini file, select File → Save.
Modifying account settings (Windows)
Each account section in the JavaScheduler.ini file contains parameters that apply toconnections made to the associated U2 account only.
Tip: The rbexamples section is provided as an example that shows the values to enter for eachaccount to which the Java Scheduler needs to connect.
1. In the JavaScheduler.ini tabbed page, edit the parameters in the account section:a. Maximize the JavaScheduler.ini tabbed page and expand the section for the account to be
modified.b. Double-click any property in the associated account section.
In the “Establish server details for this account connection” page of the account editorwizard, enter the server details for the account connection.
Table 15: Server parameters
Field Description
Account name Enter the name to use for this account section in theJavaScheduler.ini file. This name is typically the same as theaccount name that has been assigned to the account.
Server Enter the name or IP address of the RedBack Object Servercomputer for this account.
Server Type Select the type of U2 data server running on the RedBack ObjectServer computer: UniData or UniVerse.
c. In the Connection area, enter the details required to make connections between the accountand the Java Scheduler.
Chapter 10: Configuring and running the Java Scheduler
40
Table 16: Connection parameters
Field Description
Account path Enter the path to the account directory on the RedBack ObjectServer computer.
User Enter the operating system-level user ID for the RedBack ObjectServer computer.
Password | VerifyPassword
Enter the password that is associated with the user ID, and reenterthe password to verify it.
d. To test the settings that are entered for connection parameters, click Test ConnectionSettings.If the connection fails, make changes to correct the error condition and test again.
e. In the Scheduler to Database Connections area, enter or select the minimum and maximumnumber of pooled connections available to the account.
f. To modify the account’s connection pool parameters, click Next and enter details in the“Establish account connection details” page in the wizard.
Table 17: Connection pool parameters
Parameter Description
Idle RemoveThreshold
To set an idle remove threshold parameter for the account, selectthe Idle Remove Threshold check box. In the field, enter or selectthe number of milliseconds that a connection pool thread canremain idle before it is flagged for removal.
Idle Remove ExecInterval
To set an idle remove execution interval for the account, select theIdle Remove Exec Interval check box. In the field, enter or selectthe number of milliseconds of the interval at which connectionsthat have been flagged for removal are removed. The sessions willbe removed until the pool reaches the minimum connection poolamount.
Open session To set an open session parameter for the account, select theOpen session check box. In the field, enter or select the number ofmilliseconds to acquire a session from the connection pool beforetiming out.
g. To modify optional parameters for the account, click Next and complete the “Set optionalaccount and connection properties” page in the wizard.
Table 18: Optional parameters
Parameter Description
Deactivate account To deactivate the U2 account, select this check box. You can clearthe check box to reactivate the account later, if needed.
Deactivating a U2 account prevents it from consuming server orconnection pooling licenses. It disables use of the account’s RBOs inweb applications and in the RBOScope testing tool. However, userscan access a deactivated account from the U2 Resource view andwork with its RBOs in the RBO Editor.
Enable SSL forthis account’sconnection(s) toserver
To use the SSL protocol when making connections to the U2 server,select this check box.
Modifying account settings (Windows)
41
Parameter Description
Enable server-sidelogging for thisaccount
Specifies whether to save the server logs to the account _PH_ filein UniData or the &COMO& file in UniVerse.
Create theuoj_trace.log file
To keep a log of UOJ processes for the account, select this checkbox.
Enable tcp keepalive for accountthreads
To keep alive scheduler threads that take client requests, select thischeck box.
Enable schedulerdeveloper mode forthis account
Automatically resets all available connections in the connectionpool to load source code that has been created or modified.
h. To modify the monitor parameters for the account, click Next and complete the “Establishmonitor warning thresholds” page in the wizard.
Table 19: Monitor threshold parameters
Parameter Description
Average ResponseTime
Triggers monitor warnings when the overall average requestresponse time exceeds these values. The average covers the periodsince the Connection ManagerScheduler was last started. Selectthe amount of milliseconds for when to trigger yellow and when totrigger red.
Average ResponseTime Interval
Triggers monitor warnings when the average request response timeexceeds these values. The average covers a single monitor refreshinterval. Select the amount of milliseconds for when to triggeryellow and when to trigger red.
Account RequestsQueued
Triggers monitor warnings when the number of requests waiting tobe served exceeds these values. Select the amount of millisecondsfor when to trigger yellow and when to trigger red.
Slow Process Time Triggers monitor warnings when any requests exceeds this value.Select the amount of milliseconds for when to trigger red.
2. To apply the changes, click Finish.3. In the JavaScheduler.ini tabbed page, review the changes in the account section and make
corrections if necessary.4. Optional: To define separate environment variable values in an account, insert an account
environment:a. On the JavaScheduler.ini tabbed page, in the Section/Property Name column, right-click
the name of the account and select Insert Account Environment.b. In the Environment subsection, in the Value column for the account_desc property, enter an
alternative description for the account.c. Insert additional property and value pairs for each environment variable to be defined for
the account, for example,LANG=en_USTZ=MST7MDT
Tip: You can use this technique to create an alias that points to the same account, butuses a different environment variable for connection pools.
5. To save the changes to the JavaScheduler.ini file, select File → Save.
Chapter 10: Configuring and running the Java Scheduler
42
Inserting an account in the Java Scheduler configuration file (Windows)
After creating a U2 account, you can insert a reference to the account in the JavaScheduler.inifile and configure the account settings.
1. In the JavaScheduler.ini tabbed page, add an account to the JavaScheduler.ini file:a. Maximize the JavaScheduler.ini tabbed page.b. To add an account in the JavaScheduler.ini file, right-click in any empty cell and select
Insert Account.c. Complete the form in the wizard, following the same instructions for step 1 as described in
Modifying account settings (Windows), on page 39.2. To apply the new account details, click Finish.3. In the JavaScheduler.ini tabbed page, review the changes in the new account section and make
corrections if necessary.4. To save the changes to the JavaScheduler.ini file, select File → Save.
Running the Java Scheduler on Windows
After configuring the Java Scheduler, start the Java Scheduler service so it can process RedBeans andRedPages.NET connections from client applications. You can start or stop the Java Scheduler from theWeb Designer interface.
Prerequisites▪ Configuring the Java Scheduler (Windows), on page 37
Procedure
1. On the Windows computer on which Web Designer is installed, start and run Web Designer as anadministrator.
2. In the U2 Resource view, connect to the U2 server on which the RedBack Object Servercomponent is installed.
3. Expand the Accounts node.4. Expand the node of the U2 Web DE-enabled U2 account in which you want to work.5. Click the U2 Elements node and enter the RedBack administrator login credentials.
The default user name of the administrator is rbadmin and the default password is redback.6. Right-click U2 U2 Elements and select Manage Java Scheduler.7. On the Scheduler Maintenance tab, start the Java Scheduler:
a. In the Scheduler area, click Start.b. If the Java Scheduler cannot locate the Scheduler.jar file, you are prompted to browse
to the path containing Scheduler.jar. The Scheduler.jar file default location is C:\U2\U2WDEnnn\JavaScheduler by default. To continue, click Scheduler.jar and thenclick Start again.
Note: Subsequent attempts to start the Java Scheduler do not require you to browse tothe Scheduler.jar file.
8. Optional: If you need to edit the JavaScheduler.ini file, click Edit Configuration and followthe steps in Configuring the Java Scheduler (Windows), on page 37.
9. Optional: Click Restart account to restart the connection pool for the current account.
Viewing the Java Scheduler log
43
You might make changes to account parameters after starting the Java Scheduler. The changesare not applied until the account is restarted.
The default account restart time is 60 seconds. To modify this amount of time, addMaxRestartWait=nnn to the JavaScheduler.ini file, where nnn is the amount ofseconds to wait.
10. The Java Scheduler can be left running in the background. If you need to stop the process for anyreason, on the Scheduler Maintenance tab, click Stop.
Viewing the Java Scheduler log
When the Java Scheduler starts successfully, a JavaScheduler.log file is generated, whichcontains information about requests processed by the Java Scheduler.
You can view this log file by navigating to it outside of Web DE, or you can view the file directly in theWeb Designer. The location of the Javascheduler.log file is specified in the logpath parameter ofthe Javascheduler.inifile.
1. In the Web Designer, with the Java Scheduler started, click the Scheduler Maintenance tab.2. Click View Log.
The Scheduler Log View tab displays. The log displays information about requests processedsince the last time the Java Scheduler was restarted.Information about requests processed prior to the restart are stored in theJavascheduler.txt backup log file, which is accessible from the BackupLogs folder. TheBackupLogs folder is typically located in the same directory as the Javascheduler.ini file.
Figure 7: Scheduler Log View tab
a. To view the next screen of the log, click More.b. To view the end of the log, click End.c. To view the beginning of the log again, click Start.
Chapter 10: Configuring and running the Java Scheduler
44
3. To view the level of detail provided in the logs, click Set Log Level.The Set log level dialog displays with the current log level selected.
Note: You can change the log level when the Java Scheduler is running without stopping andrestarting. The new log level remains until you change it again, or until the Java Scheduler isstopped. This logging level is transient and not saved in the Java Scheduler configuration file.
Figure 8: Set log level
4. Select the appropriate log level option and click Set log level.
Monitoring performance on Windows
The Java Scheduler implements a performance monitor that records statistics on the requestsprocessed for each account, and displays results in a table as well as a visual traffic light display.These statistics provide data to help you manage request processing and determine whether to makeadjustments. The performance monitor runs as a separate process and can only be started when theJava Scheduler is running.
Prerequisites▪ Running the Java Scheduler on Windows, on page 42
Verify that the Java Scheduler is installed. For details, review Java Scheduler configurationinformation in Installation and Configuration.
Note: You must use the same version of Web Designer as the Java Scheduler or else the monitorwill not work properly. For example, use 5.2.0 versions of both components of Web DE.
Procedure
1. Start the Java Scheduler and click the Scheduler Monitor tab.
Monitoring performance on Windows
45
Figure 9: Scheduler Monitor tab
The Scheduler Monitor tab displays the traffic light indicator, which allows a quick method ofidentifying the overall performance of the system. When the system starts to slow its responseto requests, the traffic light shows a yellow light. When the number of licenses gets to a criticallevel, the yellow light turns to red. When the stop light displays these colors is configurable in theJavaScheduler.ini file.
2. To run the performance monitor, in the Monitor area, click Start.If the monitor starts successfully, the Monitor Data area is displayed. If the monitor does not start,make sure that the Java Scheduler is running with administrator rights.
3. Review the Webshares section to make sure they match up with what you have licensed for WebDE. This section shows the number of webshares that are licensed, busy, idle, and how manyrequests are waiting.
Figure 10: Webshares section
4. Review the table. The traffic light indicator changes colors based on performance levels that aredefined in the JavaScheduler.ini file. You can modify these parameters to better suit yourenvironment. For more information, see Defining the yellow and red triggers of the monitor fromthe cm.ini file, on page 46.
5. The performance monitor can be left running in the background. If you need to stop the monitorfor any reason, in the Monitor area, click Stop.
6. To write performance statistics to a log, start the Performance Statistics Logger and specify howinformation is displayed in the log. To turn the logger on and off, or change the format of the logfile from this tab, complete the following steps.
To turn it on and off, or change the format of the log file from the command line, refer toMonitoring performance on UNIX.
Chapter 10: Configuring and running the Java Scheduler
46
a. Click the Scheduler Maintenance tab.b. In the Performance Statistics Logger area, click Start.c. If the performance statistics logger starts successfully, the Perfstats.log file is created
in the U2WDEnnn folder. The default location of this folder is C:\U2\U2WDEnnn, where nnnis the version number you installed. Review the output in this log.
d. To view the statistics log as comma-delimited, select the Comma delimit log check box.e. To log only the request distribution processed by each database session or license during the
specified time interval, select the Log license distribution check box.f. The performance statistics logger can be left running in the background. To stop it for any
reason, click Stop in the Performance Statistics Logger area.
Next step
With the monitor running, you can perform the following tasks to help you manage your environment:
▪ Configure the monitor to display yellow or red according to values that are more suitable for you.See Defining the yellow and red triggers of the monitor from the cm.ini file, on page 46.
▪ View the process details for an account and the call stack when you encounter slow processes. SeeViewing RBO process details and the BASIC call stack, on page 47.
▪ View the exceptions that are thrown and reset the counter when the exceptions are addressed torestart the count. See Viewing exceptions, on page 48.
▪ Change the monitor settings such as the interval at which the monitor updates and the accounthistory information for the monitor. See Changing the monitor settings, on page 49.
▪ Filter the accounts that are displayed in the monitor table. See Filtering accounts in the monitortable, on page 50.
▪ Change which columns are displayed and in what order. See Configuring the monitor tablecolumns, on page 51.
Defining the yellow and red triggers of the monitor from the cm.ini file
The triggers for the Connection Managertraffic light indicator for the Java Scheduler monitor can bemodified in the cm.iniJavaScheduler.ini file.
Open the cm.iniJavaScheduler.ini file in a text editor and add the following parameters to theappropriate account section:
Note: You can also modify these in the Web Designer using a wizard, as described in step 3g ofInserting an account reference in the JavaScheduler.ini file, on page 12.
Table 20: Monitor parameters
Parameter Description Table field affected
AvgRespTime=n1 n2 Triggers monitor warnings when theoverall average request response timeexceeds these values. The averagecovers the period since the ConnectionManagerScheduler was last started. n1 isthe amount of time in milliseconds whenthe monitor displays yellow; n2 is theamount of time in milliseconds when themonitor displays red.
Avg Wait
Viewing RBO process details and the BASIC call stack
47
Parameter Description Table field affected
AcctRequestsQueued=n1n2
Triggers monitor warnings when thenumber of requests waiting to beserved exceeds these values. n1 is theamount of time in milliseconds whenthe monitor displays yellow; n2 is theamount of time in milliseconds when themonitor displays red.
Requests Waiting
AvgRespTimeIteration=n1n2
Triggers monitor warnings when theaverage request response time exceedsthese values. The average covers asingle monitor refresh interval. n1 is theamount of time in milliseconds whenthe monitor displays yellow; n2 is theamount of time in milliseconds when themonitor displays red.
Avg Wait Response
SlowProcessTime=n1 Triggers monitor warnings when anyrequests exceeds this value. n1 is theamount of time in milliseconds when themonitor displays red.
Slow Requests
Note: The traffic light indicator reflects the state of the table, not the status of a specific time. Thelonger your history is, the longer a color may appear on the traffic light indicator. For example, ifyour history is set to 50 lines, and you only had one red trigger occur, the traffic light will remain ina red state until the trigger is done running through each of the 50 lines.
Viewing RBO process details and the BASIC call stack
When you encounter a slow process, you can view the BASIC call stack to help you troubleshoot theproblem.
Note: The BASIC call stack is viewable with UniData versions 8.1 and higher.
Chapter 10: Configuring and running the Java Scheduler
48
1. On the monitor table, when the Slow Req column appears red, select the account and click RBOProcess Details.The Process Information for account window appears.
This window shows you all of the slow requests that are building up.2. Optional: Sort the columns by clicking a column header.3. Optional: Click Refresh Process Info to refresh the window and see new process information
that occurs with each passing interval of time.4. Select a process, and click View Call Stack.
The call stack appears.
Here, you see the last basic subroutine in the call stack where the process is taking an inordinateamount of time.
5. Click OK.
Viewing exceptions
You can view the exceptions that occurred while running the monitor.
Changing the monitor settings
49
1. From the Performance and Error Counters group, click Exceptions thrown.The Scheduler Log View pane appears with only the exceptions displayed.
2. Optional: To view the beginning of the entire log, and not just the exceptions, click Start.3. Optional: To clear the exceptions, click Reset Counter.
Changing the monitor settings
You can update the monitor interval time, change the amount of historical lines per account, and howwebshare usage should be displayed by changing the settings for the monitor.
1. Click the Gear icon ( ), and select Filters → Settings.
Note: The same options accessed from the Gear icon are available by right-clicking the table.
The Monitor Settings window appears.
2. Change the settings for the performance monitor.
Chapter 10: Configuring and running the Java Scheduler
50
The following table describes the settings.
Table 21: Performance monitor settings
Parameter Description
Interval Enter or select the number of seconds to delay between requests fordata from the monitor thread.
The default interval is 1 second. The minimum setting is 1; themaximum setting is 300.
History Enter or select the number of lines of history to keep in the Monitortable area of the Scheduler Monitor tab for each account.
The default number of lines of history is 5. The minimum setting is 1;the maximum setting is unlimited.
Webshare UsageDisplay Options
Select whether to display the “Busy” and “Idle” webshare informationas a whole number of as a percentage.
3. Click OK to accept the changes.
Filtering accounts in the monitor table
Some sites require multiple accounts, but you might only need to monitor a few at a time. You canfilter which accounts you want to see and then restart the Monitor to have only the selected accountsdisplayed. The filtered accounts are then the only accounts that trigger the yellow and red alertsinstead of all the accounts.
1. Click the Gear icon ( ), and select Filters → Accounts.
Note: The same options accessed from the Gear icon are available by right-clicking the table.
The Monitor Accounts Filter window appears.
Figure 11: Monitor Accounts Filter window
2. Select the check box next to the account that you want to display, and click Accept Changes.The monitor restarts so it can apply the filter.
Monitoring client threads
Use the Scheduler Monitor pane to show the status of client threads and thread pools.
Configuring the monitor table columns
51
1. Click the Gear icon ( ), and select Account Thread Details.
2. In the Client Thread Information dialog, click Refresh Thread Info to view the current client IPaddresses that are being used and the associated client threads.
3. Click OK to return to the Scheduler Monitor pane.
Configuring the monitor table columns
You can configure which columns are displayed in the table and reorganize them to the order youwant.
1. Click the Gear icon ( ), and select Filters → Table columns.
Note: The same options accessed from the Gear icon are available by right-clicking the table.
The Monitor Columns Filter window appears.
Chapter 10: Configuring and running the Java Scheduler
52
Figure 12: Monitor Columns Filter window
2. Clear the check boxes for the columns that you do not want displayed. By default, all columns aredisplayed.
3. Click Accept Changes.
Configuring the parameters to work with your system
When you add the parameters to the JavaScheduler.ini file that affect the data table, asdescribed in Defining the yellow and red triggers of the monitor from the cm.ini file, on page 46, youmight not get the results to appear how you want.
To adjust your system properly to show each scenario, you need to understand the normal behavior ofyour environment. This allows you to determine the appropriate value for the monitor.
For example, if your Web DE average response is 100ms, then you should consider changing the yellowsetting if the average increases to 200ms, and changing the red setting if the average increases to500ms. Careful consideration should be taken when assigning these values.
Registering or unregistering the Java Scheduler as a Windows service
The Java Scheduler process is registered as a Windows service by default, but the service can beunregistered as a Windows service, registered again through the Web Designer interface, or both.
About this task
When the Java Scheduler is registered as a Windows service, it offers the same conveniences as anyother Windows service:
Managing the Java Scheduler on UNIX
53
▪ The process restarts automatically after the server computer is restarted.
▪ The service can be started or stopped from the Control Panel → Administrative Tools → Servicespanel.
Regardless of whether you run the Java Scheduler as a Windows service, you can start or stop theprocess through the Web Designer. If you prefer not to run the Java Scheduler as a Windows service,unregister the service and manage it from the Web Designer interface only.
Procedure
1. On the Windows computer on which Web Designer is installed, start and run Web Designer as anadministrator.
2. In the U2 Resource view, connect to the U2 server on which the RedBack Object Servercomponent is installed.
3. Expand the Accounts node.4. Expand the node of the U2 Web DE-enabled U2 account in which you want to work.5. Click the U2 Elements node and enter the RedBack administrator login credentials.
The default user name of the administrator is rbadmin and the default password is redback.6. Right-click U2 U2 Elements and select Manage Java Scheduler.7. On the Scheduler Maintenance tab, in the Windows Scheduler service area, unregister or register
the Java Scheduler as a Windows service:▪ If the Java Scheduler is currently registered as a Windows service, the Unregister button is
active; click Unregister.
▪ If the Java Scheduler is not currently registered as a Windows service, the Register button isactive; click Register.
Managing the Java Scheduler on UNIXThe Java Scheduler can be installed on or deployed to a UNIX computer and managed on UNIX inseveral administration tasks:
▪ Configuring the Java Scheduler (UNIX), on page 53
▪ Modifying environment variables on UNIX, on page 56
▪ Running the Java Scheduler on UNIX, on page 57
▪ Monitoring performance on UNIX, on page 58
Configuring the Java Scheduler (UNIX)
Global and account-related parameters provide the settings that the Java Scheduler requires toprocess HTTP requests. After installing Web DE, configure the Java Scheduler, configure the JavaScheduler by editing the JavaScheduler.ini file.
Prerequisites
Before you can configure the Java Scheduler, you need to have Web DE installed with the RedBackObject Server and Java Schedulerr deployed to a UNIX computer. For more information, seeInstallation and Configuration. A U2 server must also be defined, as described in Creating a U2 serverdefinition, on page 8.
Chapter 10: Configuring and running the Java Scheduler
54
About this task
Configure the Java Scheduler on UNIX by editing the configuration file on Windows in the WebDesigner, which encrypts passwords in the file, and then deploy the file to a UNIX computer.
1. On a Windows computer, open Web Designer and edit a local version of theJavaScheduler.ini file from Tools → Edit Java Scheduler Configuration. For detailedsteps, see Configuring the Java Scheduler (Windows), on page 37.
2. Select Tools → Deploy to U2 server → Deploy a file or folder to deploy theJavaScheduler.ini file to the target UNIX computer.
As an alternative, you can modify the JavaScheduler.ini file directly in an editor such as vi.
Important: The alternative method is the easiest way to edit the configuration file on a UNIXcomputer, but it does not encrypt passwords.
Procedure
1. Modifying environment variables (UNIX), on page 542. Modifying account settings (UNIX), on page 543. Inserting an account in the Java Scheduler configuration file (Windows), on page 42
Modifying environment variables (UNIX)
To run on a UNIX computer, the Java Scheduler needs the values of environment variables that supplythe information required to process requests. After configuring the Java Scheduler, you must setenvironment variables on the UNIX server computer.
Prerequisites▪ Configuring the Java Scheduler (UNIX), on page 53
Procedure
1. On the UNIX computer to which Web Designer is installed, set the value of the LANG environmentvariable to en_US.
2. Set the CLASSPATH environment variable to the Java Scheduler directory (for example,CLASSPATH=/U2/U2WDEnnn/JavaScheduler).
3. Set the PATH environment variable to the directory containing JRE 6 or later.4. Set the U2WDE environment variable to the parent directory in which components of Web DE
are deployed (for example, U2WDE=/U2/U2WDEnnn, where nnn is the version number youinstalled).
Modifying account settings (UNIX)
Each account section in the JavaScheduler.ini file contains parameters that apply toconnections made to the associated U2 account only.
Tip: The rbexamples section is provided as an example that shows the values to enter for eachaccount to which the Java Scheduler needs to connect.
1. With the JavaScheduler.ini file still open in the editor, edit parameters in the [account]section:
Modifying account settings (UNIX)
55
a. On the first line of the section in the file, change the name of the account, if necessary. Theaccount name must be enclosed in square brackets (for example, [myAccount])
b. Change the value of any parameter, if necessary.
Table 22: Account parameters
Parameter Description
workdir Enter the physical path to the account directory on the RedBackObject Server computer.
MinimumPoolSize Enter the minimum number of api_slave processes to be started andrun by the Java Scheduler for the account.
MaximumPoolSize Enter the maximum number of api_slave processes to be startedand run by the Java Scheduler for the account.
ConnectionString Enter udcs for UniData or uvcs for UniVerse.userId Enter the operating system-level user ID for the RedBack Object
Server computer.password Enter the password associated with the user IDserver Enter the name or IP address of the RedBack Object Server
computer.como Use this option to start or stop copying server logs to the account
_PH_ file in UniData or the &COMO& file in UniVerse.▪ 0 – Do not save the logs.
▪ 1 – Save the logs.usingssl Enter a value to indicate whether to use the SSL protocol when
making connections to the U2 server.
0 – Do not use SSL.
1 – Use SSL.
2. Optional: To define separate environment variable values in an account, insert an accountenvironment:a. In the [account] section, insert a subsection:
[account.Environment]
where account is the same name as the [account] section.
b. In the [account.Environment] subsection, insert the following parameter and value:
account_desc=account_description
where account_description is an alternative description for the account.
c. Insert additional property and value pairs for each environment variable to be defined forthe account, for example,
LANG=en_US
TZ=MST7MDT
Tip: You can use his technique to create an alias that points to the same account, butuses a different environment variable for connection pools.
3. To save the changes to the JavaScheduler.ini file, select File → Save.
Chapter 10: Configuring and running the Java Scheduler
56
Adding an account to the Java Scheduler configuration file (UNIX)
After creating a U2 account, you can add the account to the JavaScheduler.ini file and configurethe account settings.
Tip: The [rbexamples] section is provided as an example that shows the values to enter for eachaccount to which the Java Scheduler needs to connect.
1. With the JavaScheduler.ini file still open in the editor, add a section for an account:a. On the first blank line in the accounts section of the file, enter the name of the new account,
enclosed in square brackets (for example, [myAccount].b. On each subsequent line, enter the name of the parameter, the equal sign, and a value for
the parameter (for example, password=falc0n399, as shown in the Description column ofthe following table.
Table 23: Account parameters
Parameter Description
workdir Enter the physical path to the account directory on the RedBackObject Server computer.
MinimumPoolSize Enter the minimum number of api_slave processes to be started andrun by the Java Scheduler for the account.
MaximumPoolSize Enter the maximum number of api_slave processes to be startedand run by the Java Scheduler for the account.
ConnectionString Enter udcs for UniData or uvcs for UniVerse.userId Enter the operating system-level user ID for the RedBack Object
Server computer.password Enter the password associated with the user ID, and reenter the
password to verify it.server Enter the name or IP address of the RedBack Object Server
computer.como Use this option to start or stop copying server logs to the account
_PH_ file in UniData or the &COMO& file in UniVerse.▪ 0 – Do not save the logs.
▪ 1 – Save the logs.usingssl Enter a value to indicate whether to use the SSL protocol when
making connections to the U2 server.
0 – Do not use SSL.
1 – Use SSL.
2. To save the changes to the JavaScheduler.ini file, select File → Save.
Modifying environment variables on UNIX
To run on a UNIX computer, the Java Scheduler needs the values of environment variables that supplythe information required to process requests. After configuring the Java Scheduler, you must setenvironment variables on the UNIX server computer. interface.
Running the Java Scheduler on UNIX
57
Prerequisites▪ Configuring the Java Scheduler (UNIX), on page 53
Procedure
1. On the UNIX computer where Web Designer is installed, set the value of the LANG environmentvariable to en_US.
2. Set the CLASSPATH environment variable to the Java Scheduler directory. For example,CLASSPATH=/U2/U2WDEnnn/JavaScheduler.
3. Set the PATH environment variable to the directory containing JRE 6 or later.4. Set the U2WDE environment variable to the parent directory in which components of Web DE
is deployed (for example, U2WDE=/U2/U2WDEnnn, where nnn is the version number youinstalled).
Running the Java Scheduler on UNIX
When you deploy the Java Scheduler to a UNIX computer, the wizard copies a standard script tothe Java Scheduler directory on the target computer. You can modify the deployed script for theenvironment and run it as needed to manage the Java Scheduler on UNIX. The script runs the JavaScheduler as a background process on the UNIX computer.
Prerequisites▪ Modifying environment variables on UNIX, on page 56
You must set the U2WDE environment variable to parent directory in which components of Web DEwere deployed to the UNIX computer (for example, U2WDE=/U2/U2WDEnnn, where nnn is the versionnumber you installed).
The U2 data server to which the Java Scheduler is connected must be running in order to makesuccessful connections to each U2 account. The Java Scheduler can run on a separate computer fromthe U2 data server; no checking is performed to ensure that the U2 data server is running.
Procedure
1. On the UNIX computer to which the Java Scheduler is deployed, open a command window andchange directory to the Java Scheduler path.
2. In the Java Scheduler directory, open the U2WebDESchedulerScript file for editing.3. Review the content of the U2WebDESchedulerScript file. If necessary, modify the content of
the script for the environment and save the changes to the file.4. To start the Java Scheduler, open a command window and run the script with the start
command:U2WebDESchedulerScript start
5. You can leave the Java Scheduler running in the background. To stop the Java Scheduler at anytime, in the command window run the script with the stop command:U2WebDESchedulerScript stop
6. To restart the Java Scheduler, in the command window run the script with the restartcommand:U2WebDESchedulerScript restart
Chapter 10: Configuring and running the Java Scheduler
58
The default account restart time is 60 seconds. To modify this amount of time, addMaxRestartWait=nnn to the JavaScheduler.ini file, where nnn is the amount ofseconds to wait.
When the Java Scheduler starts successfully, a JavaScheduler.log file is generated in thedirectory specified in the JavaScheduler.ini file. The log contains information similar to thefollowing:
Jan 11, 2013 8:40:27 AM com.rs.u2.u2cm.h INFO: Thread[main,5,main]--- U2CM Logging started at Fri Jan 11 08:40:27 MST 2013--- Jan 11, 2013 8:40:27 AM com.rs.u2.u2cm.h a INFO: Thread[main,5,main]Scheduler licensed for 10 webshares. Jan 11, 2013 8:40:27 AM com.rs.u2.u2cm.h a INFO: Thread[main,5,main]Starting database sessions. Jan 11, 2013 8:40:28 AM com.rs.u2.u2cm.h a INFO: Thread[main,5,main] 10 udcs database processes started for /U2/U2WDE521/rbodemo Jan 11, 2013 8:40:28 AM com.rs.u2.u2cm.h a INFO: Thread[main,5,main]The monitor for U2 Connection Manager has startedon port 7071 Jan 11, 2013 8:40:28 AM com.rs.u2.u2cm.h a INFO: Thread[main,5,main]Database check started
You can navigate to the JavaScheduler.log file to view the log, or you can use the Web Designerto view it, as described in Viewing the Java Scheduler log, on page 43.
Monitoring performance on UNIX
The performance monitor on the Scheduler Monitor tab of the Web Designer can be used to monitorconnections on a UNIX computer. If you prefer, you can run the performance monitor directly onthe UNIX computer to which the Java Scheduler was deployed. The performance monitor runs as aseparate, but dependent process and can be started only when the Java Scheduler is running.
Prerequisites▪ Running the Java Scheduler on UNIX, on page 57
▪ Start the Java Scheduler and keep it running for this task.
Procedure
1. With the Java Scheduler running on the UNIX computer, open a separate command window tothe Java Scheduler path.
2. In the command window, enter the following command to start the performance monitor:
java -jar getRequests.jar 200 1
The first parameter is the number of iterations to run. You can run any number of iterations.
The second parameter is the interval of each iteration in seconds. The interval is the number ofseconds of delay between requests for data from the monitor thread. Increase or decrease thissetting as necessary.
The output of the monitor is similar to the following:Run queue is 0 Busy webshares are 0rbodemo Requests are 54180 Avg license wait time is 4Run queue is 0 Busy webshares are 0rbodemo Requests are 54180 Avg license wait time is 4
Monitoring performance on UNIX
59
3. To write performance statistics to a log, start the Performance Statistics Logger and specify howinformation is displayed in the log. When the logger starts, a Perfstats.log file is created inthe U2WDEnnn folder. The default location of this folder is C:\U2\U2WDEnnn, where nnn is theversion number you installed.
Enter the appropriate combination of command line options, as shown in the following examples:
▪ To start the logger without specifying how the log file format, enter -start in the commandline. The log file will look similar to the following example:
2017-06-06,18:10:23.069 Requests Request Avg Resp2017-06-06,18:10:23.070 Total per wait wait per wait2017-06-06,18:10:23.070 Account Name Requests Interval time interval time2017-06-06,18:10:24.071 rbexamples 2 0 85 0 0 2017-06-06,18:10:25.072 rbexamples 2 0 85 0 02017-06-06,18:10:26.076 rbexamples 2 0 85 0 0 2017-06-06,18:10:27.076 rbexamples 2 0 85 0 0 2017-06-06,18:10:28.077 rbexamples 2 0 85 0 0 2017-06-06,18:10:29.079 rbexamples 2 0 85 0 0 2017-06-06,18:10:30.079 rbexamples 2 0 85 0 0 2017-06-06,18:10:31.081 rbexamples 2 0 85 0 0
▪ To start the logger and view the log as comma-delimited, enter -start -cd in thecommand line:
2017-06-06,18:16:28.945 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:32.946 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:33.947 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:34.948 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:35.949 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:36.950 ,rbexamples,4,0,804,0,0,0,2,0,02017-06-06,18:16:37.950 ,rbexamples,5,1,643,0,0,0,1,1,02017-06-06,18:16:38.950 ,rbexamples,5,0,643,0,0,0,1,1,02017-06-06,18:16:39.951 ,rbexamples,5,0,643,0,0,0,1,1,02017-06-06,18:16:40.951 ,rbexamples,5,0,1246,3013,0,0,2,0,02017-06-06,18:16:41.951 ,rbexamples,5,0,1246,0,0,0,2,0,0
▪ To start the logger and log only the request distribution processed by each databases sessionor license during the specified time interval, enter -start -ld in the command line:
2017-06-06,18:17:19.611 rbexamples 0 02017-06-06,18:17:20.612 rbexamples 0 02017-06-06,18:17:21.612 rbexamples 0 02017-06-06,18:17:22.613 rbexamples 0 02017-06-06,18:17:23.613 rbexamples 0 02017-06-06,18:17:24.613 rbexamples 0 02017-06-06,18:17:25.613 rbexamples 1 02017-06-06,18:17:26.613 rbexamples 0 02017-06-06,18:17:27.614 rbexamples 0 0
▪ To start the logger, log only the request distribution processed by each databases sessionor license during the specified time interval, and view the log as comma-delimited, enter -start -ld -cd in the command line:
2017-06-06,18:18:28.599 ,rbexamples,0,02017-06-06,18:18:29.601 ,rbexamples,0,02017-06-06,18:18:30.601 ,rbexamples,0,02017-06-06,18:18:31.602 ,rbexamples,0,0
Chapter 10: Configuring and running the Java Scheduler
60
2017-06-06,18:18:32.602 ,rbexamples,0,0
▪ To specify how often the data is collected, include a number before the command. Forexample, entering 5 -start -cd specifies that data is collected every five seconds, asshown in the following example:
2017-06-07,07:31:36.827 ,rbexamples,8,0,1157,0,0,0,2,0,02017-06-07,07:31:41.827 ,rbexamples,8,0,1157,0,0,0,2,0,02017-06-07,07:31:46.828 ,rbexamples,8,0,1157,0,0,0,2,0,02017-06-07,07:31:51.829 ,rbexamples,8,0,1157,0,0,0,2,0,02017-06-07,07:31:56.829 ,rbexamples,8,0,1157,0,0,0,2,0,0
61
Chapter 11: Using the Admin API ServerThe Admin API Server hosts a Web-based API and UI, which controls the administration of the JavaScheduler (Connection Manager).
For detailed instructions on installing the Admin API Server, see the Web DE Installation andConfiguration guide.
Configuring, starting, and stopping the Admin APIServer
The application.properties file is the configuration file for the Admin API Server, and islocated in the apiserver directory of the Web DE installation directory.
Refer to the Web DE Installation and Configuration guide for details regarding this file.
1. Open the application.properties file with a text editor.2. In the [DB] section, set the properties to connect to the rbdefn account and validate credentials
from the WWUSERS file.▪ Ensure db.port is set to the database server port that stores the rbdefn account.
▪ Ensure db.user contains the user name of a person with permission to access the rbdefnaccount.
▪ Ensure db.host contains the host of the database server that stores the rbdefn account.
▪ Ensure db.account contains the complete path to the rbdefn account on the database server.
▪ Ensure db.service contains the name to use to connect to the database server storing therbdefn account. Use uvcs for UniVerse, or udcs for UniData.
3. Generate an encrypted form of the password for the db.user specified in the previous step byrunning the following program, which accepts a password and then returns an encrypted stringfor the password:$ java -jar hazify.jar -iEnter password: <hidden-password> [Enter]Enter password again: <hidden-password> [Enter]Encrypted password is: 5ngyZOfm3M0kxWUi2SdUlA==
4. Copy the encrypted password string and paste it into the db.pass field.5. Save the application.properties file.6. Start the Admin API Server.
▪ On Windows, start the Admin API Server from Windows Services.
▪ On UNIX, start the Admin API Server from the command line using the following shellcommand:
$ start-admin.sh &
It might take several minutes for the service to start, depending on your installationconfiguration. Runtime errors are stored in the cm-admin.log file, which is located in theapiserver logs directory.By default, the Admin API server is listening on port 7077. You can access it in a browser athttp://host:7077. The default login user name and password are rbadmin and redback.
7. Secure the connections between the rbdefn account and the Admin API server, and theconnections between the Admin API Server and the browser client. Refer to the Web DEInstallation and Configuration guide for instructions on securing these connections.
Chapter 11: Using the Admin API Server
62
8. You can stop the Admin API Server at any time.▪ On Windows, stop the Admin API Server from Windows Services.
▪ On UNIX, stop the Admin API Server from the command line using the following command:
$ stop-admin.sh
The Connection Manager Admin API ServerIn addition to the Web Admin User Interface, you can drive the Connection Manager (a.k.a. JavaScheduler) admin functionality through an HTTP 1.1 application programming interface using yourown client. This section details the API language for Connection Manager.
Connection Manager Admin API paths
Use the following POST, GET, and PUT paths to perform Connection Manager (Java Scheduler) tasks,such as starting the Connection Manager or setting the logging level.
Start the Connection Manager
POST /api/manager/_start
Starts the Connection ManagerJava Scheduler
Responses
Table 24: Start Connection ManagerJava Scheduler Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Stop the Connection Manager
POST /api/manager/_stop
Stops the Connection ManagerJava Scheduler
Responses
Table 25: Stop Connection ManagerJava Scheduler Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get accounts
63
Get accounts
GET /api/manager/accounts
Returns a JSON encoding representing a list of accounts. The decoded response is a list containingaccounts. Each account in the list is a dictionary containing statistics and information about theaccount.
Responses
Table 26: Get Accounts Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get account information
GET /api/manager/accounts/stats
Returns a JSON encoding representing account information along with a list of accounts. The decodedresponse is a dictionary containing a list of accounts and several key value pairs describing connectionmanager information. Each account in the list is a dictionary containing statistics about the account.
Responses
Table 27: Get Account Information Responses
Code Description Schema
200 Success401 Unauthorized403 Forbidden500 Failure
Chapter 11: Using the Admin API Server
64
Update account
POST /api/manager/accounts/{accountName}
Updates a Connection ManagerJava Scheduler account
Parameters
Table 28: Update Account Parameters
Name Located In Description Required Schema
accountName path accountName Yes
data body data Yes
Responses
Table 29: Update Account Responses
Code Description Schema
200 OK201 Created401 Unauthorized403 Forbidden
Restart account
POST /api/manager/accounts/{accountName}/_restart
Restarts the account specified in the accountName path parameter
Parameters
Table 30: Restart Account Parameters
Name Located In Description Required Schema
accountName path accountName Yes
Get config file
65
Responses
Table 31: Restart Account Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get config file
GET /api/manager/config
Body of HTTP response contains a JSON representation of the Connection ManagerJava Schedulerconfiguration file.
Responses
Table 32: Get Config Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Save config file
PUT /api/manager/config
Saves Connection ManagerJava Scheduler configuration file.
Parameters
Table 33: Save Config Parameters
Name Located In Description Required Schema
config body ConnectionManagerconfiguration
Yes
Chapter 11: Using the Admin API Server
66
Responses
Table 34: Save Config Responses
Code Description Schema
200 Success401 Unauthorized403 Forbidden500 Failure
Get log entries
GET /api/manager/log
Returns log entries from the cm logJava Scheduler file. Takes an optional query string value ‘offset’ todetermine which part of and how much of the log is returned. Note the value must be an integer. Thereare three different options for the offset value: -1 returns the last 8 KB of data from the log file. This ishelpful for getting the latest entries to the log. An offset of 0 returns up to 4 MB of data starting at thebeginning of the log. Any other positive integer offset value returns the next 4 MB of data from the logafter skipping over number of bytes. This can be used to retrieve the entire log if it is larger than 4 MB.If number is larger than the log size the ‘log’ value with be the empty string.
Parameters
Table 35: Get Log Entries Parameters
Name Located In Description Required Schema
offset query offset No
Responses
Table 36: Get Log Entries Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get log errors
GET /api/manager/logerrors
Returns all error log entries from the cm logJava Scheduler file.
Get status of performance statistics logger
67
Responses
Table 37: Get Log Errors Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get status of performance statistics logger
GET /api/manager/perfstats
Returns operational status of the performance statistics logger.
Responses
Table 38: Performance Statistics Logger Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Start performance statistics logger
POST /api/manager/perfstats/_start
Start the performance statistics logger
Chapter 11: Using the Admin API Server
68
Parameters
Table 39: Start Performance Statistics Logger Parameters
Name LocatedIn
Description Required Schema
cmPerfStatsbody cmPerfStats Yes
Responses
Table 40: Start Performance Statistics Logger Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Stop performance statistics logger
POST /api/manager/perfstats/_stop
Stop the performance statistics logger
Responses
Table 41: Stop Performance Statistics Logger Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get API process information
GET /api/manager/processinfo
Get API process information.
Set logging level
69
Parameters
Table 42: Get API Process Information Parameters
Name Located In Description Required Schema
account query account Yes
Responses
Table 43: Get API Process Information Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Set logging level
POST /api/manager/setloglevel/{loglevel}
Set the logging level for Connection Managerthe Java Scheduler. Options are INFO, WARNING, SEVERE(errors), FINE (debug).
Parameters
Table 44: Set Logging Level Parameters
Name Located In Description Required Schema
loglevel path loglevel Yes
Responses
Table 45: Set Logging Level Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get call stack
GET /api/manager/stack
Get the call stack.
Chapter 11: Using the Admin API Server
70
Parameters
Table 46: Get Call Stack Parameters
Name Located In Description Required Schema
pid query pid Yes
Responses
Table 47: Get Call Stack Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get Connection Manager status
GET /api/manager/status
Returns basic status information for Connection Managerthe Java Scheduler.
Responses
Table 48: Get Connection Manager Status Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get user
GET /api/user
Get the logged in user.
Get session ID
71
Responses
Table 49: Get User Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Get session ID
GET /api/token
Gets the session ID for this session.
Responses
Table 50: Get Session ID Responses
Code Description Schema
200 OK401 Unauthorized403 Forbidden
Connection Manager Admin API Server models
The Connection Manager AdminWeb API Server uses a set of JSON model structures in its request andresponse payloads. These models are described in the sections that follow.
Chapter 11: Using the Admin API Server
72
Account
Response entity
73
Response entity
Chapter 11: Using the Admin API Server
74
Config
CmAccount
75
CmAccount
Chapter 11: Using the Admin API Server
76
ModelMap
Collection<<Account>>
Environment variable
CmPerfStats
CmStatus
77
CmStatus
CmStats
CmLog
Chapter 11: Using the Admin API Server
78
API GET example
This section contains a simple GET API example that fetches the configuration parameters ofConnection Managerthe Java Scheduler. The Connection ManagerJava Scheduler URI for this exampleis http://localhost:7077/api/manager/config
CURL script example
Retrieve CM configuration
curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H\"Cache-Control: no-cache" -H "NikMan-Token: 5e68d0cc-9920-2e9e-ad3c-a14ad7f28651" \"http://localhost:7077/api/manager/config"
Response (unformatted):
{"status":"ok","config":{"logLevelPanic":false,"logLevelErr":false,"logLevelInf":false,"logLevelInit":false,"logLevelWrn":false,"logLevelTrace":false,"schedulerPort":7870,"monitorPort":7071,"logPath":"C:\\U2\\cm\\connection-manager\\logs\\cm.log","mvisdefnPath":"C:\\U2\\cm\\ud\\MVISDEFN","server":"localhost","userId":"nkesic","password":"fL1KWIksXqEmQut8EkxFAA==","connectionString":"udcs","usingSsl":false,"sslKeyStore":"","sslKeyStorePassword":"","accounts":[],"environmentDefaultVariables":[],"loggingLevel":"INFO"}}
{"status":"ok","config":{"logLevelPanic":false,"logLevelErr":false,"logLevelInf":false,"logLevelInit":false,"logLevelWrn":false,"logLevelTrace":false,"schedulerPort":7870,"monitorPort":7071,"logPath":"C:\\U2\\U2WDE530\\JavaScheduler\JavaScheduler.log","rbdefnPath":"C:\\U2\\U2WDE530\udserverrbdefn","server":"localhost","userId":"nkesic","password":"fL1KWIksXqEmQut8EkxFAA==","connectionString":"udcs","usingSsl":false,"sslKeyStore":"","sslKeyStorePassword":"","accounts":[],"environmentDefaultVariables":[],"loggingLevel":"INFO"}}
Python example “NikMan.py”
Retrieve CM configuration
import http.client
conn = http.client.HTTPConnection("u2tc.rocketsoftware.com")
headers = { 'cache-control': "no-cache", 'postman-token': "ca656da3-aee6-310a-309a-ee753953e751" }
conn.request("GET", "/", headers=headers)import http.client
conn = http.client.HTTPConnection("localhost:7077")
headers = { 'authorization': "Basic YWRtaW46YWRtaW4=", 'cache-control': "no-cache", 'NikMan-token': "49adc38f-ab38-9a49-7f29-c926908a2b89" }
API GET example
79
conn.request("GET", "/api/manager/config", headers=headers)
res = conn.getresponse()data = res.read()
print(data.decode("utf-8"))res = conn.getresponse()data = res.read()
print(data.decode("utf-8"))
Response (unformatted):
C:\Users\nkesic\Desktop>python NikMan.py{"status":"ok","config":{"logLevelPanic":false,"logLevelErr":false,"logLevelInf":false,"logLevelInit":false,"logLevelWrn":false,"logLevelTrace":false,"schedulerPort":7870,"monitorPort":7871,"logPath":"C:\\U2\\cm\\connection-manager\\logs\\cm.log","mvisdefnPath":"C:\\U2\\cm\\ud\\MVISDEFN","server":"localhost","userId":"nkesic","password":"fL1KWIksXqEmQut8EkxFAA==","connectionString":"udcs","usingSsl":false,"sslKeyStore":"","sslKeyStorePassword":"","accounts":[],"environmentDefaultVariables":[],"loggingLevel":"INFO"}}Traceback (most recent call last): File "NikMan.py", line 27, in <module> res = conn.getresponse()File "C:\Users\nkesic\AppData\Local\Programs\Python\Python35-32\lib\http\client.py",line 1164, in getresponse raise ResponseNotReady(self.__state) http.client.ResponseNotReady: Idle
C:\Users\nkesic\Desktop>pythonNikMan.py{"status":"ok","config":{"logLevelPanic":false,"logLevelErr":false,"logLevelInf":false,"logLevelInit":false,"logLevelWrn":false,"logLevelTrace":false,"schedulerPort":7870,"monitorPort":7871,"logPath":"C:\\U2\\U2WDE530\\JavaScheduler\\JavaScheduler.log","rbdefnPath":"C:\\U2\\U2WDE530\\udserverrbdefn","server":"localhost","userId":"nkesic","password":"fL1KWIksXqEmQut8EkxFAA==","connectionString":"udcs","usingSsl":false,"sslKeyStore":"","sslKeyStorePassword":"","accounts":[],"environmentDefaultVariables":[],"loggingLevel":"INFO"}}Traceback(most recent call last): File "NikMan.py", line 27, in <module> res = conn.getresponse()File"C:\Users\nkesic\AppData\Local\Programs\Python\Python35-32\lib\http\client.py",line 1164, ingetresponse raise ResponseNotReady(self.__state) http.client.ResponseNotReady:Idle
80
Chapter 12: TroubleshootingThe following sections contain information to help you troubleshoot Web DE.
Troubleshooting client logging issuesClient log files capture events that occur when RedBeans or RedPages.NET processes RBO methodcalls for a Web DE-enabled U2 account.
The names of the client log files are:
▪ RedBeans_accountname.log
▪ RedPages_accountname_processid.log, where processid is the ID of the Windows processwith RedPagesNet.dll loaded.
Parameters in the rgw5.ini file define the characteristics of client logging for Web DE-enabled U2accounts. If you experience a problem with client logging, complete the troubleshooting steps in thefollowing procedure.
Setting up the local log folder to produce a client log file
If a RedBeans_accountname.log or RedPages_accountname_processid.log file was notcreated for an account, the likely cause is an empty setting in the rgw5.ini configuration file. Youcan specify the location in which to store client logs for each U2 account in the rgw5.ini file.
1. From the Web Designer, select Tools → Edit Gateway Configuration.2. In the Open window, browse to the C:\U2\U2WDEnnn directory, where nnn is the version
number you installed, and double-click the rgw5.ini file.On UNIX computers, the rgw5.ini file must be created manually or created on your local clientand then copied to a UNIX system. The preferred location for this file is in the /etc directory.
3. In the RBO Editor pane of the Web Designer, double-click the name of the account for which theclient log is missing.
4. In the wizard, perform the following substeps:a. In the “Establish server details for this account connection” page of the account editor
wizard, enter server details for the account connection.
Table 51: Server parameters
Field Description
Account name Enter the name to use for this account section in theJavaScheduler.ini file. This name is typically the same as theaccount name that has been assigned to the account.
Server Enter the name or IP address of the RedBack Object Servercomputer for this account.
Server Type Select the type of U2 data server running on the RedBack ObjectServer computer: UniData or UniVerse.
b. In the Connection area, enter the details required to make connections between the accountand the Java Scheduler.
Troubleshooting Java Scheduler issues
81
Table 52: Connection parameters
Field Description
Account path Enter the path to the account directory on the RedBack ObjectServer computer.
User Enter the operating system-level user ID for the RedBack ObjectServer computer.
Password | VerifyPassword
Enter the password that is associated with the user ID, and reenterthe password to verify it.
c. To test the settings that are entered for connection parameters, click Test ConnectionSettings.If the connection fails, make changes to correct the error condition and test again.
5. To apply the changes, click Finish.
Troubleshooting Java Scheduler issuesThe Java Scheduler manages data transfer between the RedBack Object Server and the web server. Ithandles HTTP requests and UO.NET or UOJ connections.
If you experience a problem related to the Java Scheduler, complete the troubleshooting steps in thefollowing procedures.
Starting the Java Scheduler in the rbexamples account
If you run a test on an rbexamples account that has not been upgraded to Web DE 5.1.0 or later, errorsare written to client, Java Scheduler, and server logs. The Java Scheduler was introduced in 5.1.0, andthe rbexamples account must be upgraded to 5.1.0 or later to enable the Java Scheduler. Failure toupgrade the account causes the Java Scheduler to fail at startup.
1. Check for errors in the client log, named RedBeans_accountname.log orRedPages_accountname_processid.log, where processid is the ID of the Windowsprocess with RedPagesNet.dll loaded.
If you run a test against a Java Scheduler port when the Java Scheduler is not running, an errorsimilar to the following error is written to the client log:
Exception caught: RedObject.jrgwOpen(): No RPC Connection active.The log entry for the client failure from RedBeans_rbexamples.log. 2013-02-05 08:15:02 Thread[main,5,main] In jrgwOpen UniSessionException [Rocket U2][UniObjects for Java][UniSession Exception][ErrorCode: 81002]No RPC Connection active.
2. Check for errors in the scheduler log, located in the specified scheduler log path.
The following error indicates that the Java Scheduler failed at startup:
INFO: Thread[main,5,main]Database check startedFeb 5, 2013 7:52:44 AM com.rs.u2.u2cm.U2CMLogger log SEVERE: Thread[Thread-3,5,main]com.rs.u2.u2cm.U2CMDbcheck run 112 [Rocket U2][UniObjects for Java][UniSubroutine Exception][ErrorCode: 30105]Unable to load the subroutine on the server
3. Check for errors in the server debug log.
Chapter 12: Troubleshooting
82
The following error, created by the uniapi_slave process, indicates that the subroutine failedbecause of a missing catalog pointer:
07:52:44; errno=0: udapi_server non execute command.Tue Feb 05 07:52:44; errno=0: api_slave: function code=52.Tue Feb 05 07:52:44; errno=0: ICSubCall args=7,name=WW.READREC,Tue Feb 05 07:52:44; errno=0: arg[0]=,Tue Feb 05 07:52:44; errno=0: arg[1]=,Tue Feb 05 07:52:44; errno=0: arg[2]=,Tue Feb 05 07:52:44; errno=0: arg[3]=,Tue Feb 05 07:52:44; errno=0: arg[4]=,Tue Feb 05 07:52:44; errno=0: arg[5]=,Tue Feb 05 07:52:44; errno=0: arg[6]=3, subcall [WW.READREC]:'WW.READREC' is not cataloged.Tue Feb 05 07:52:44; errno=0: ICSubCall returned from basic, ReturnCode=-1.Tue Feb 05 07:52:44; errno=0: udapi_server rpc_read_message returncode=81002.Tue Feb 05 07:52:44; errno=0: api_slave: api_pipe_read 1 byte_count = -1 away.Tue Feb 05 07:52:44; errno=0: udapi_server exit connect_number=1.
4. Close Web Designer.5. Upgrade the rbexamples account to Web DE 5.1.0 or later.6. Start Web Designer and run the test again in the RBOScope testing tool.
Updating the number of webshares
If the number of webshares is invalid, the following error can occur in the Javascheduler.log filewhen trying to use the Java Scheduler:
INFO: Thread[main,5,main]Scheduler licensed for 0 webshares.Oct 1, 2013 10:55:24 AM com.rs.u2.u2cm.h aINFO: Thread[main,5,main]Scheduler shutting down due to invalid number of webshares.
To correct this error, configure your server for the number of webshares you have. For more details,see the information about licensing and authorizing Web DE in Installation and Configuration.
If connection pooling has been ordered instead of webshares, you must add on webshares to yourlicense rather than connection pooling.
83
Appendix A: Configuration filesThe following sections describe the content of the Web DE configuration files.
JavaScheduler.ini fileThe Java Scheduler configuration file, JavaScheduler.ini, is in the directory that is specified bythe U2WDE environment variable. The RedBack Object Server uses the JavaScheduler.ini file forglobal and account-level connection parameters used to process requests.
Format
The JavaScheduler.ini file format is:
[SectionName]parameter_1=value_xparameter_2=value_y...
Each section contains a set of related parameters. Web DE searches the JavaScheduler.ini filefor predefined and user-defined section names, and updates internal parameters based on the valuesset in the file. Most of the section names are predefined, so you cannot change them. However, youcan define the names of additional sections.
Example JavaScheduler.ini file
The following example of the JavaScheduler.ini file contains the default sections and settingsthat show the type of data required for each parameter:
[LogLevel]logging.level=SEVERE
[Default]SchedulerPort=7070MonitorPort=7071logpath=C:\U2\U2WDE521\Javascheduler.logRbdefnPath=C:\U2\U2WDE521\UDserver\rbdefnserver=localhostuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==ConnectionString=udcscomo=1usingssl=0sslKeyStore=PathToSSLKeystoresslKeyStorePassword=6B6jy5KN5o6l1rY5j26riQ==
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamplesMinimumPoolSize=2MaximumPoolSize=2ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostcomo=1usingssl=0ThreadSocketTimeOut=1000
Appendix A: Configuration files
84
unirpcTimeout=100
Sections of the JavaScheduler.ini file
The JavaScheduler.ini file includes three default sections:
▪ [LogLevel] section
▪ [Default] section
▪ [account] section
[LogLevel] section
This section of the JavaScheduler.ini file contains parameters for the types of information towrite to the JavaScheduler.log file for Web DE-enabled U2 accounts. The log level parametersare global; they apply to all Web DE-enabled U2 accounts on the RedBack Object Server computer.
The following example shows the [LogLevel] section:
[LogLevel]logging.level=SEVERE
The following table lists the available logging levels. Each level, with the exception of OFF, enablesthe logging level selected and every logging level beneath the selected level should be sent to theJavaScheduler.log file. For example, selecting the Logging level INFO includes logging at theINFO, WARNING, and SEVERE logging levels. Selecting FINE includes FINE, INFO, WARNING, andSEVERE logging levels.
Table 53: [LogLevel] section parameters
Logging level Description
OFF Log nothingALL Log everythingFINE Log general tracing informationINFO Log reasonably significant informationWARNING Log potential problemsSEVERE Log events preventing proper execution
[Default] section
The parameters in this section define Web DE system defaults. They apply to all Web DE-enabled U2accounts within the system. You can override the defaults within each [account] section.
The following example shows the [Default] section:
[Default]SchedulerPort=7070MonitorPort=7071logpath=C:\U2\U2WDE521\Javascheduler.logRbdefnPath=C:\U2\U2WDE521\UDserver\rbdefnserver=localhostuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==ConnectionString=udcs
[Default] section
85
usingssl=0sslKeyStore=PathToSSLKeystoresslKeyStorePassword=6B6jy5KN5o6l1rY5j26riQ==ThreadSocketTimeOut=60
The following table lists the default global parameters at the Web DE system level. You can add otherdefault parameters in this section, if applicable.
Table 54: [Default] section parameters
Parameter Description
SchedulerPort The port number on which the Java Scheduler accepts RBO requests. Makenote of this setting when editing the rgw5.ini file.
MonitorPort The port number on which the Java Scheduler accepts monitor andmaintenance requests.
logpath The path to the JavaScheduler.log file.RbdefnPath The path to the deployed rbdefn account.server The name or IP address of the computer on which the RedBack Object Server
is installed.userId The operating system-level user ID for the RedBack Object Server computer.password The password associated with the user ID.ConnectionString Specifies whether the connection is a UniData (udcs) or UniVerse (uvcs) or
connection.como Use this option to start or stop copying server logs to the account _PH_ file
in UniData or the &COMO& file in UniVerse.
▪ 0 – Do not save the logs.
▪ 1 – Save the logs.usingssl Specifies whether to use Secure Sockets Layer (SSL) protocol when making
connections to the U2 server.
0 – Do not use SSL.
1 – Use SSL.sslKeyStore The path to the SSL keystore for the Java Scheduler.sslKeyStorePassword The password for the SSL keystore.ThreadSocketTime
Out
The number of seconds the U2 Web DE clients (RedBeans/RedPages.NET)connections remain open without activity before they time out.
If a ThreadSocketTimeOut entry is not specified in the [Default] section of theJavaScheduler.ini file, the system will use the 8-hour timeout default.You can override this default in the [Default] section of the file.
For example, if you add ThreadSocketTimeout=60 to the [Default]section, each connection will timeout after 60 seconds of inactivity.
Continuing with this example, you can also set timeout defaults for specificaccounts in the [account] section of the file. If you specify an account in[rbexamples] and add ThreadSocketTimeout=120, all connectionsestablished for the rbexamples account will timeout after 2 minutes ofinactivity, while all other connections will timeout after 60 seconds ofinactivity, as specified in the [Default] section.
Appendix A: Configuration files
86
[account] section
The JavaScheduler.ini file contains a section for each account. The name of the section is theconnection name of the account, used as a reference by RedBeans or RedPages.NET.
In each [account] section, you must define at least the mandatory parameters for the account. You canspecify additional parameters. If you specify a parameter in the [account] section that is also in the[Default] section, the value that you set for the account overrides the system default value.
The following example shows the [account] section:
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamplesMinimumPoolSize=2MaximumPoolSize=2ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostusingssl=0ThreadSocketTimeOut=120unirpcTimeout=100validateClient=1
The following table describes the parameters in the [account] section:
Table 55: [account] section parameters
Parameter Description
workdir The physical path to the U2 account on the computer on which theRedBack Object Server is installed.
MinimumPoolSize The minimum number of connections maintained in the connection pool.MaximumPoolSize The maximum number of connections maintained in the connection pool.ConnectionString Specifies whether the connection is a UniData (udcs) or UniVerse (uvcs)
connection.userId The operating system-level user ID for the RedBack Object Server
computer.password The password associated with the user ID specified in the userId parameter.
The password is encrypted when you save the JavaScheduler.ini filein Web Designer.
If you edit and save the JavaScheduler.ini file in a text editor, thepassword is saved in plain text. To maintain server security, open and savethe JavaScheduler.ini file in Web Designer to encrypt the password.
server The name or IP address of the computer on which the RedBack ObjectServer is installed.
[account] section
87
Parameter Description
como Use this option to start or stop copying server logs to the account _PH_file in UniData or the &COMO& file in UniVerse.
▪ 0 – Do not save the logs.
▪ 1 – Save the logs.
If this option is set to 1, the log files contain information about requestsreceived since the last time the Java Scheduler was restarted.
Information about requests received prior to restart are stored in abackup log file named after the account, which is accessible from theBackupLogs folder. The BackupLogs folder is typically located in thesame directory as the JavaScheduler.ini file.
usingssl Specifies whether to use the SSL protocol when connecting to the U2server.
▪ 0 – Do not use SSL.
▪ 1 – Use SSL.ThreadSocketTimeOut The number of seconds the U2 Web DE clients (RedBeans/RedPages.NET)
connections remain open without activity before they time out.
If a ThreadSocketTimeOut entry is not specified in the [Default] sectionof the JavaScheduler.ini file, the system will use the 8-hour timeoutdefault. You can override this default in the [Default] section of the file.
For example, if you add ThreadSocketTimeout=60 to the [Default]section, each connection will timeout after 60 seconds of inactivity.
Continuing with this example, you can also set timeout defaults for specificaccounts in the [account] section of the file. If you specify an account in[rbexamples] and add ThreadSocketTimeout=120, all connectionsestablished for the rbexamples account will timeout after 2 minutes ofinactivity, while all other connections will timeout after 60 seconds ofinactivity, as specified in the [Default] section.
unirpcTimeout Optional parameter that specifies the maximum amount of time the JavaScheduler is going to wait for a response before it considers the requestas timed out and sends an appropriate message back to the coding client.This parameter needs to be less than the unirpcTimeout parameter set inthe rgw5.ini file. Default is 300 seconds.
validateClient Specifies whether to validate client credentials before sending requeststhrough the Java Scheduler.
▪ 0 - Do not validate client credentials (default).
▪ 1 - Validate client credentials.
The client credentials (user ID and password) are validated against theuserID and password, which is also specified in the [account] section of theJavaScheduler.ini file.
[account.Environment] subsection
This subsection of the [account] section is optional. To define separate environment variable valuesin an account, insert an account environment with appropriate properties and values. In the followingexample, the rbexamples2 environment has the language set to United States English, and the timezone set to Mountain Standard Time (MST) and Mountain Daylight Time (MDT).
Appendix A: Configuration files
88
You can also customize each environment by adding Tcl (Tool Command Language) commands, whichare run when a connection is established. To enter these types of commands, complete the followingsteps:
1. Access the JavaScheduler.ini file by selecting Edit Local Java Scheduler Configurationfrom the Tools menu.
2. If separate environments do not exist, create a new one by right-clicking and selecting InsertAccount Environment from the drop-down menu.
3. Right-click on the environment and select Insert Property from the drop-down menu.4. Enter the command, (for example, RUN BP TEST) in the NewProperty field and leave the
NewValue field blank.5. Click Save to save your changes. The command you entered will run when a connection for that
environment is established.
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamplesMinimumPoolSize=2MaximumPoolSize=2ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostThreadSocketTimeOut=120usingssl=0
[rbexamples.Environment]account_desc=rbexamples2LANG=en_USTZ=MST7MDTRUN BP TEST
rgw5.ini fileConfiguration of RedPages.NET and RedBeans connections is controlled through the rgw5.ini file,which is installed on Windows by default in the C:\U2\U2WDEnnn directory, where nnn is the versionnumber you installed. This path is set in the environment variable %U2WDE%. On UNIX systems,the rgw5.ini must be manually copied to your desired location, for example, the /etc directory.The $U2WDE environment variable should be created and the value set to point to the path to thergw5.ini file.The gateway configuration file, rgw5.ini, is in the directory specified by the U2WDEenvironment variable. The RedBack gateway components, which run on the web server or the client,use the rgw5.ini file for global parameters and as a reference to the location at which each U2account resides.
Format
The rgw5.ini file format is:
[SectionName]parameter_1=value_xparameter_2=value_y...
Each section contains a set of related parameters. Web DE searches the rgw5.ini file for predefinedand user-defined section names, and updates internal parameters based on the values set in the file.
Sections of rgw5.ini file
89
Most of the section names are predefined, so you cannot change them. However, you can define thenames of additional sections.
Example rgw5.ini file
The following example rgw5.ini file contains the default sections and settings that show the type ofdata required for each parameter:
[LogLevel]panic=1err=1inf=0init=1times=1wrn=1trace=1
[Default]perfstats=0
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamplesMinimumPoolSize=2MaximumPoolSize=2ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostlogpath=C:\U2\U2WDE521;SchedulerPort=7070como=1usingssl=1PoolingDebug=1IdleRemoveThreshold=15000IdleRemoveExecInterval=1000OpenSessionTimeout=1000unirpcTimeout=500
Sections of rgw5.ini file
The rgw5.ini file contains three default sections:
▪ [LogLevel] section
▪ [Default] section
▪ [accountname] section
[LogLevel] section
This section of the rgw5.ini file contains parameters for the types of information to write to theclient log files for Web DE-enabled U2 accounts. The log level parameters are global; they apply to allWeb DE-enabled U2 accounts on the RedBack Object Server computer.
The client log files are:
Appendix A: Configuration files
90
▪ RedBeans_accountname.log
▪ RedPages_accountname_processid.log, where processid is the ID of the Windows processwith RedPagesNet.dll loaded.
The following example shows the [LogLevel] section:
[LogLevel]panic=1err=1inf=0init=1times=1wrn=1trace=1
The following table lists the log level parameters. Each parameter specifies whether to write details fora type of information to the client log files.
[Default] section
The parameters in this section define Web DE system defaults. They apply to all Web DE-enabled U2accounts within the system. You can override the defaults within each [accountname] section.
The following example shows the [Default] section:
[Default]perfstats=0
The following table lists the default global parameters at the Web DE system level. You can add otherdefault parameters in this section, if applicable.
Table 56: [Default] section parameters
Parameter Description
perfstats Specifies whether to log performance statistics.
▪ 0 – Do not log performance statistics.
▪ 1 – Log performance statistics.
The Perfstats.log file includes the same statistics available from theWeb DE performance monitor API, such as wait time and number of requestsprocessed for each account.
The Perfstats.log file is written to the C:\U2\U2WDEnnn directory bydefault, where nnn is the version number you installed.
[accountname] section
The rgw5.ini file contains a section for each account. The name of the section is the connectionname of the account, used as a reference by RedBeans or RedPages.NET.
In each account section, you must define at least the mandatory parameters for the account. You canspecify additional parameters. If you specify a parameter in the [accountname] section that is also inthe [Default] section, the value you set for the account overrides the system default value.
The following example shows the [accountname] section:
[rbexamples]workdir=C:\U2\U2WDE521\UDserver\rbexamples
[accountname] section
91
MinimumPoolSize=2MaximumPoolSize=2ConnectionString=udcsuserId=cbrownpassword=2spwV0hJequEefsSBqK1KQ==server=localhostlogpath=C:\U2\U2WDE521;SchedulerPort=7070como=1usingssl=1PoolingDebug=1IdleRemoveThreshold=15000IdleRemoveExecInterval=1000OpenSessionTimeout=1000unirpcTimeout=500
The following table describes the parameters in the [accountname] section:
Table 57: [accountname] section parameters
Parameter Description
workdir The physical path to the U2 account on the computer on which theRedBack Object Server is installed.
MinimumPoolSize The minimum number of connections maintained in the connection pool.
Setting this value and the MaximumPoolSize value to 0 enables thedeveloper mode, which allows you to execute newly compiled codethrough Web DE processes. Instead of using a cached version of the objectcode, the developer mode allows you to pick up the new object code assoon as it is available by causing the associated database processes torestart after each method call. While allowing newly compiled code to bepicked up, this mode carries a performance overhead as the associateddatabase processes terminate and are recreated after each method calland is not recommended for “live” production use for this reason.
The SchedulerPort must also be commented out to bypass the connectionto the Java Scheduler.
MaximumPoolSize The maximum number of connections maintained in the connection pool.
Setting this value and the MinimumPoolSize value to 0 enables thedeveloper mode. See the description in MinimumPoolSize for informationabout the developer mode.
ConnectionString Specifies whether the connection is a UniData (udcs) or UniVerse (uvcs)connection.
userId The operating system-level user ID for the RedBack Object Servercomputer.
password The password associated with the user ID specified in the userIdparameter.
The password is encrypted when you save the JavaScheduler.ini filein Web Designer.
If you edit and save the rgw5.ini file in a text editor, the passwordis saved in plain text. To maintain server security, open and save thergw5.ini file in Web Designer to encrypt the password.
server The name or IP address of the computer on which the RedBack ObjectServer is installed.
Appendix A: Configuration files
92
Parameter Description
logpath The full path of the directory in which to store client logfiles for the account on the client computer. The clientlog files are RedBeans_accountname.log andRedPages_accountname_processid.log, where processid is the IDof the Windows process with RedPagesNet.dll loaded.
The directory must already exist; Web DE does not create a new directoryfor you. If the specified logpath directory does not exist, the applicationfails at run time.
SchedulerPort The port number on which the Java Scheduler accepts requests from thisaccount.
If this parameter is commented out, and the MinimumPoolSize andMaximumPoolSize parameters are set to 0, the Java Scheduler connectionis bypassed.
como Specifies whether to save the server logs to the account _PH_ file inUniData or the &COMO& file in UniVerse.
▪ 0 – Do not save the logs.
▪ 1 – Save the logs.usingssl Specifies whether to use the SSL protocol when connecting to the U2
server.
▪ 0 – Do not use SSL.
▪ 1 – Use SSL.PoolingDebug Specifies whether to keep a log of UOJ processes for the account for
debugging purposes.
▪ 0 – Do not keep a log of UOJ processes.
▪ 1 – Keep a log of UOJ processes.encoding Allows support of any session encoding for connections using
RedPages.NET or RedBeans.IdleRemoveThreshold The number of milliseconds that a connection pool thread can remain idle
before it is flagged for removal.IdleRemoveExecInterval The number of milliseconds of the interval at which UOJ runs an
executable to remove from a connection pool any threads that haveexceeded the idle threshold.
OpenSessionTimeout The number of milliseconds for which UOJ attempts to acquire a sessionfrom the connection pool before timing out.
unirpcTimeout Optional parameter that specifies the maximum amount of time the client(RedBeans or RedPages.NET) is going to wait for a response from the JavaScheduler before it considers the request as timed out. Default is 300seconds.
The application.properties fileThe application.properties file contains connection, configuration, and monitoring settingsfor the Admin API Server. Change these settings by opening this file in a text editor and restarting theAdmin API Server.
The application.properties file
93
The application.properties file is created during installation and written to the apiserverdirectory by default.
The [Server] section
Specify server port and session timeout information for the Admin API Server.
Property Description
server.port The Admin API Server port. The default is port 7077.server.session.timeout The amount of time, in seconds, that a session to the Admin API Server
UI and API remains valid before timing out due to inactivity.
The [CM] section
Specify server port and session timeout information for the Java Scheduler (Connection Manager).
Property Description
cm.host The host running the Java Scheduler (Connection Manager). Thisproperty should always be set to localhost, as the Admin API Serverand the Java Scheduler (Connection Manager) should always beinstalled on the same machine.
cm.adminport The Java Scheduler (Connection Manager) admin port. The default isport 7071.
cm.stats.poll.interval The interval at which information about the accounts you aremonitoring is captured. This interval is set to 1000 milliseconds, or onceper second, by default.
This property is related to the Update Interval setting in the WebAdmin UI, which indicates how often account information is updated.This interval is set to 1, or once per second, by default.
You can change either interval, but note that if the Update Intervalsetting is more frequent than this interval setting, the Web Admin UIwill display old information until this interval is reached and capturesnew information.
cm.history.items.max The maximum number of account updates accessible from theAccount History section of the Web Admin UI, which displays the mostrecent updates for each active account.
The Web Admin UI displays the 5 most recent updates by default.You can change this setting, but you will not be able to exceed themaximum number of items established here, which is set to 50 items bydefault.
Note: When the Account History is set higher than 5, the browser canuse excessive RAM and the Java Scheduler (Connection Manager) cancrash, so exercise caution when changing these settings.
The [DB] section
Specify database port information, settings related to validating Admin API Server user credentials,and SSL properties.
Properties Description
db.port The unirpcservices server port on the dataserver that holds the rbdefnaccount.
Appendix A: Configuration files
94
Properties Description
db.user The user name of a person with permission to access the rbdefnaccount.
The db.user and db.pass credentials will be used to connect to therbdefn account and validate credentials from the WWUSERS file.
Note: If you need to use a "\" character in the user name, use twoslashes ("\\") instead of one in order for the path to be understood bythe application.properties file.
db.pass The password for the user specified in db.user. Must be in encryptedformat. See Configuring, starting, and stopping the Admin API Serverfor information on encrypting passwords.
db.host The host of the database server that stores the rbdefn account.db.service The name to use to connect to the database server storing the rbdefn
account. Use uvcs for UniVerse, or udcs for UniData.db.account The complete path to the rbdefn account on the database server.
Note: If you are configuring it to point to a path on a remote Windowsmachine, the application.properties file expects twobackslashes “\\” when specifying a backslash “\” character. For UNIX,use a single slash.
For example:
▪ For Windows, use C:\\U2\\U2WDE5xx\\UVserver\\rbdefn.
▪ For UNIX, use /disk1/wde5xx/rbdefn.db.using ssl Specifies whether to use Secure Sockets Layer (SSL) protocol when
making connections from the Admin API Server to the database.
▪ Do not use SSL - false
▪ Use SSL - truedb.ssl-trust-store The path to the truststore for the dataserver certificate.db.ssl-trust-store-password
The password for the truststore.
The [LOGGING] section
Specify logging parameters for the Admin API Server.
Property Description
logging.level.root The root logging level.
Available options are: Trace, Debug, Info, Warn, Error, Fatal,Off.
logging.path The location of the log file.logging.file The name of the log file.logging.admin.filename The name of the admin log file.logging.level.com.rs.mv.cm The logging level for the admin log file.
Available options are: Trace, Debug, Info, Warn, Error, Fatal,Off.
The application.properties file
95
The [SSL] section
Configure the Admin API Server to support SSL connections.
Properties Description
server.port The server port to be used for secure access to the Admin API Server.The default is 7043.
server.ssl.key-store The path to the keystore, which contains the certificate and private key.
Instructions for creating or obtaining certificates are outside the scopeof this document.
server.ssl.key-store-password
The password for the keystore.
server.ssl.key-password The password obtained when the certificate and private key werecreated.
96
Appendix B: Error codesThe following section describes the error codes that you might encounter while working in Web DE.These error codes are from exceptions thrown by UniObjects for Java (UOJ).
Error codesThese are the error codes that can be returned to a UniObjects for Java application, together withtheir replace tokens. Each token should be used with the UniObjectsTokens prefix—for example,UniObjectsTokens.UVE_NOERROR.
Table 58: Error Codes
Code Token Description
0 UVE_NOERROR No error14002 UVE_ENOENT No such file or directory14005 UVE_EIO I/O error14009 UVE_EBADF Bad file number14012 UVE_ENOMEM No memory available14013 UVE_EACCES Permission denied14022 UVE_EINVAL Invalid argument14023 UVE_ENFILE File table overflow14024 UVE_EMFILE Too many open files14028 UVE_ENOSPC No space left on device14551 UVE_NETUNREACH Network is unreachable22001 UVE_BFN Bad Field Number22002 UVE_BTS Buffer size too small20003 UVE_IID Illegal record ID22004 UVE_LRR The last record in the select list has been read22005 UVE_NFI Not a file identifier30001 UVE_RNF Record not found30002 UVE_LCK This file or record is locked by another user30095 UVE_FIFS The file ID is incorrect for the current session30097 UVE_SELFAIL The select operation failed30098 UVE_LOCKINVALID The task lock number specified is invalid30099 UVE_SEQOPENED The file was opened for sequential access and you
have attempted hashed access30100 UVE_HASHOPENED The file was opened for hashed access and you have
attempted sequential access30101 UVE_SEEKFAILED The operation using fileSeek() failed30103 UVE_INVALIDATKEY The key used to set or retrieve an @variable is
invalid30105 UVE_UNABLETOLOADSUB Unable to load the subroutine on the server30106 UVE_BADNUMARGS Too few or too many arguments supplied to the
subroutine
Error codes
97
Code Token Description
30107 UVE_SUBERROR The subroutine failed to complete successfully30108 UVE_ITYPEFTC The I-type operation failed to complete correctly30109 UVE_ITYPEFAILEDTOLOAD The I-type failed to load30110 UVE_ITYPENOTCOMPILED The I-type has not been compiled30111 UVE_BADITYPE This is not an I-type, or the I-type is corrupt30112 UVE_INVALIDFILENAME Must specify a filename30113 UVE_WEOFFAILED WEOFSEQ failed30114 UVE_EXECUTEISACTIVE An EXECUTE is currently active on the server30115 UVE_EXECUTENOTACTIVE No EXECUTE is currently active on the server30124 UVE_TX_ACTIVE Cannot perform this operation while a transaction is
active30125 UVE_CANT_ACCESS_PF Cannot access part files30126 UVE_FAIL_TO_CANCEL Failed to cancel an execute30127 UVE_INVALID_INFO_KEY Bad key for the host type30128 UVE_CREATE_FAILED The creation of a sequential file failed30129 UVE_DUPHANDLE_FAILED Failed to duplicate a pipe handle31000 UVE_NVR No VOC record31001 UVE_NPN No pathname in VOC record39101 UVE_NODATA The server is not responding39119 UVE_AT_INPUT The server is waiting for input to a command39120 UVE_SESSION_NOT_OPEN The session is not open39121 UVE_UVEXPIRED The database license has expired39122 UVE_CSVERSION The client and the server are not running at the
same release level39123 UVE_COMMSVERSION The client or server is not running at the same
release level as the communications support39124 UVE_BADSIG You are trying to communicate with the wrong
client or server39125 UVE_BADDIR The directory does not exist or is not a database
account39127 UVE_BAD_UVHOME Cannot find the UV account directory39128 UVE_INVALIDPATH An invalid pathname was found in the UV.ACCOUNT
file39129 UVE_INVALIDACCOUNT The account name supplied is not an account39130 UVE_BAD_UVACCOUNT_FILE The UV.ACCOUNT file could not be found or opened39131 UVE_FTA_NEW_ACCOUNT Failed to attach to the specified account39134 UVE_ULR The user limit has been reached on the server39135 UVE_NO_NLS NLS is not available39136 UVE_MAP_NOT_FOUND NLS map not found39137 UVE_NO_LOCALE NLS locale support not available39138 UVE_LOCALE_NOT_FOUND NLS locale not found39139 UVE_CATEGORY_NOT_FOUND NLS locale category not found39201 UVE_SR_SOCK_CON_FAIL The server failed to connect to the socket
Appendix B: Error codes
98
Code Token Description
39210 UVE_SR_SELECT_FAIL The server failed to select on input channel. Whenyou see this error, you must quit and reopen thesession.
39211 UVE_SR_SELECT_TIMEOUT The select has timed out40001 UVE_INVALIDFIELD Pointer error in a sequential file operation40002 UVE_SESSIONEXISTS The session is already open40003 UVE_BADPARAM An invalid parameter was passed to a subroutine40004 UVE_BADOBJECT An incorrect object was passed40005 UVE_NOMORE The nextBlock() method was used but there are
no more blocks to pass.40006 UVE_NOTATINPUT Thereply() method can be used only when the
response() method returns UVS_REPLY40007 UVE_INVALID_DATAFIELD The dictionary entry does not have a valid TYPE field40008 UVE_BAD_DICTIONARY_ ENTRY The dictionary entry is invalid40009 UVE_BAD_CONVERSION_ DATA Unable to convert the data in the field45000 UVE_FILE_NOT_OPEN File has been closed, must reopen before
performing an operation45001 UVE_OPENSESSION_ERR Maximum number of UniJava sessions already
open45002 UVE_NONNULL_RECORDID Cannot perform operation on a nonnull record ID80011 UVE_BAD_LOGINNAME The user name or login name provided is incorrect80019 UVE_BAD_PASSWORD The password has expired80144 UVE_ACCOUNT_EXPIRED The account has expired80147 UVE_RUN_REMOTE_FAILED Unable to run as the given user80148 UVE_UPDATE_USER_FAILED Unable to update user details81001 UVE_RPC_BAD_CONNECTION The connection is bad and may be passing corrupt
data.81002 UVE_RPC_NO_CONNECTION The connection is broken81005 UVE_RPC_WRONG_VERSION The version of the UniRPC on the server is different
from the version on the client.81007 UVE_RPC_NO_MORE_
CONNECTIONSNo more connections available
81009 UVE_RPC_FAILED The UniRPC failed81011 UVE_RPC_UNKNOWN_HOST The host name specified is not valid, or the host is
not responding81014 UVE_RPC_CANT_FIND_ SERVICE Cannot find the service in the unirpcservices
file81015 UVE_RPC_TIMEOUT The connection has timed out81016 UVE_RPC_REFUSED The connection was refused as the UniRPC daemon
is not running81017 UVE_RPC_SOCKET_INIT_
FAILEDFailed to initialize the network interface
81018 UVE_RPC_SERVICE_PAUSED The UniRPC service has been paused81019 UVE_RPC_BAD_TRANSPORT An invalid transport type has been used81020 UVE_RPC_BAD_PIPE Invalid pipe handle81021 UVE_RPC_PIPE_WRITE_ERROR Error writing to pipe
Error codes
99
Code Token Description
81022 UVE_RPC_PIPE_READ_ERROR Error reading from pipe