RadixWare Programmer Guide/Quick Start Guide

From RadixWiki
Jump to: navigation, search

The section describes how to develop a simple application "from scratch" using the RadixWare technological platform.

The sequence of steps is described in the following subsections:

Installing Platform

To install the RadixWare platform, execute the following steps:

  1. Install RadixWare Manager (refer to RadixWare. Software Products Installation and Upgrade Technology).
  2. Get the RadixWare platform distribution kit from vendor.
  3. Using RadixWare Manager, install the RadixWare platform (refer to RadixWare. Software Products Installation and Upgrade Technology).

Developing an Application on RadixWare Platform

Main title: Developing an Application on RadixWare Platform

Setting up Database Maintenance

Almost all enterprise software requires regular maintenance of the database (for example: some data must be archived, other data should be deleted according to storage time options, Oracle partitions should be created in time, etc.). Experience shows that the optimal periodicity of the database maintenance is daily and every five minutes. RadixWare implements the infrastructure for the automatic database maintenance. To define the maintenance procedures for your application, you should create the PL/SQL package in the DDS-segment of your layer and define the daily and continually functions (Note: in older versions the continually function name was misspelled as “continualy”):

  1. Create a new DDS module.
  2. In the created module, add a new package and set the Database name to “MAINTENANCE”.
  3. Add two functions to this package and set the Database names to “daily” and “continually” (Note: in older versions: “continualy”, use the same name as defined in the RDX_Maintenance package).
  4. In the Body sections of these functions, add the code for calling the RDX_Maintenance.daily and RDX_Maintenance.continually functions respectively as well as the application specific code to maintain your database.
  5. Call the context menu of the DDS segment and run the Commit Structure command.
  6. Create new connection and run the generated SQL script using the Run SQL Script button or by pressing F5 on your keyboard to create the Maintenance package in your development database.
  7. The daily and continually functions of your Maintenance package will be called automatically by the predefined scheduled tasks. You can change the task setting by using RadixWare Explorer: open the system settings node and find a list of system units; choose the Job Scheduler unit and go to the Tasks tab where you can see the Daily System Maintenance and Continuous System Maintenance tasks. Ex.: in the default RadixWare explorer root, the path to these tasks is as follows: RadixWare/System Settings/System Units/Job Scheduler/Tasks.

Making a Release

Follow the steps to make a release:

1. Double click the Project root element in RadixWare Designer. In the opened window, click the Edit.jpg button next to the Distributable Layers field and select layers of your product, which will be included in the release.
Select distributable layers dialog.png
2. Select the Make release item in the context menu of the root project branch in RadixWare Designer navigation tree. In the dialog box that will open, specify the version of the release to be created (for example, 1.1.53).

Installing Created Application

To install the created application, perform the following actions in RadixWare Manager:

  1. Select the Build | Test environment item from the context menu of the release appeared in the Releases branch.
  2. Select the Install Database item from the context menu of the Test branch.

For details on how to install the application, refer to RadixWare. Software Products Installation and Upgrade Technology.

Configuring Startup Scripts

To run the RadixWare Platform components, use the startup scripts. But first, you should set up these scripts in accordance with your runtime environments.

Note.jpg Note: if you use Linux, you should add execute permission to the script files. You can do it using the chmod command (for details on chmod usage, run the man chmod command).

In all scripts you should specify the RADIX_HOME parameter. This parameter contains the path to the root directory of the local copy of the development branch. In the designer.cmd, server.cmd and explorer.cmd scripts, the parameter setup command should look as follows:

example.jpg @set RADIX_HOME=”C:\Radix”

In the designer.sh, server.sh and explorer.sh scripts, the parameter setup command should look as follows:

example.jpg RADIX_HOME=”/home/nataly/radix”

To run the RadixWare Server, specify the OJDBC_DRIVER parameter. This parameter contains the path to the Oracle JDBC drive file (ex. ojdbc6.jar). In the server.cmd script, the parameter setup command should look as follows:

example.jpg @set OJDBC_DRIVER=”C:\Radix\ojdbc6.jar”

In the server.sh script, the parameter setup command should look as follows:

example.jpg OJDBC_DRIVER=”/home/nataly/radix/ojdbc6.jar”

Note.jpg Note: you can use a relative path as a parameter value. For example, RADIX_HOME=”.” in Linux, @set RADIX_HOME=. in Windows.

Starting RadixWare Server and RadixWare Explorer in Development Mode

The application can be debugged on the same computer where it was developed (without connection to the SVN repository). The project should be compiled first. To start up RadixWare Server, run the server.cmd or server.sh script or go to the directory of the development branch working copy and execute the following command:

example.jpg java [JVM_Options] -cp org.radixware\kernel\starter\bin\dist\starter.jar;OJDBC-PATH org.radixware.kernel.starter.Starter -configFile FILE

where:

  • [JVM_Options] - JVM parameters (refer to JVM documentation)
  • OJDBC-PATH - path to jar-file containing JDBC driver. It is possible to use the ojdbc6.jar file delivered in the Oracle Client distribution kit.
  • FILE - path to the configuration file where the RadixWare Starter and RadixWare Server startup parameters are defined.

Then, in the dialog box that will open, define the database connection parameters (refer to RadixWare Starter. Administrator Guide and RadixWare Server. Administrator Guide).

To start RadixWare Server, the configuration file mentioned in the command example above must contain the [Starter], [Server] sections and, optionally, the [App] section. The example of the configuration file content is provided below:

example.jpg [Starter]

# URI of software product upper layer

topLayerUri = org.productUpperLayer

# Working directory containing the working copy of the application repository. The specified directory must contain the branch.xml file.

workDir = .

# Main class of application being started

appClass = org.radixware.kernel.server.Server

# Text to be displayed on start screen

showSplashScreen = Server

[Server]

# URI of DB being used

dbUrl = jdbc:oracle:thin:@databaseServer:1521/TEST

# Schema and DB user name being used

dbSchema = TEST

user = TEST

# Password for DB account; after the server is started for the first time, the parameter is deleted from the configuration file. However, the encrypted password is saved in the parameter with a different name.

pwd = TEST

# ID of system instance

instance = 1

# if it is required to create and start a new instance, specify the value in the following format: instance="new: instanceSap=1.2.3.4:5, easSap=1.2.3.4:6, scp=SCP_NAME"


# Instant start of RadixWare Server without displaying the dialog box to enter the startup parameters

autostart

[App]

# Security policy

askUserPwdAfterInactivity = 1

uniquePwdSeqLen = 4

pwdMinLen = 7

pwdMustContainAChars = 1

pwdMustContainNChars = 1

blockUserInvalidLogonCnt = 6

blockUserInvalidLogonMins = 30

pwdExpirationPeriod = 90

For RadixWare Starter and RadixWare Server startup parameters, refer to RadixWare Starter. Administrator Guide and RadixWare Server. Administrator Guide.

To start up RadixWare Explorer from the same directory, run the explorer.cmd or explorer.sh script or execute the following command:

example.jpg java [JVM_Options] -cp org.radixware\kernel\starter\bin\dist\starter.jar org.radixware.kernel.starter.Starter -configFile FILE

where:

  • [JVM_Option] - JVM parameters (refer to JVM documentation)
  • FILE - path to the configuration file where the RadixWare Starter and RadixWare Server startup parameters are defined.

The configuration file used to start the RadixWare Desktop Explorer by using the command described above must contain the [Starter] and [Explorer] sections. The example of the configuration file content is provided below:

example.jpg [Starter]

# URI of software product upper layer

topLayerUri = org.productUpperLayer

# Working directory containing the working copy of the application repository. The specified directory must contain the branch.xml file.

workDir = .

# Main class of application being started

appClass = org.radixware.kernel.explorer.Explorer

# Text to be displayed on start screen

showSplashScreen = Explorer

# Parameter that must be present only when running on OS X

#disableSwingPreload

[Explorer]

# Trace level and trace file

-traceProfile = Debug

-traceFile = trace.log

# Startup parameters for RadixWare User Extensions Designer

extDesignerMaxHeapSize=1000m

extDesignerMaxPermSize=300m

Once RadixWare Explorer is started up, define the parameters for connecting to the server (refer to RadixWare Explorer. User Guide). See the default connection parameters on the screenshot below:

Default connection options en.jpg

Default values of the base connection options:

User name: ADMINISTRATOR
Servers: localhost:10001
Station name: ServerConsole

After the connection, RadixWare Explorer main window will open:

Explorer_main_page.png

Putting RadixWare Server into Operation

For pruduction usage, RadixWare is usually started up on another computer (not that one where the application was developed).

To put RadixWare server into operation, it is required to get only RadixWare Starter from the SVN repository (starter.jar file). For this purpose, select the Export Starter item from the Test branch context menu of RadixWare Manager project.

To start the server from the directory where the starter.jar file was loaded, execute the following command:

example.jpg java -server [JVM_Options] -cp starter.jar;OJDBC-PATH org.radixware.kernel.starter.Starter -configFile FILE

  • [JVM_Option] - JVM parameters (refer to JVM documentation)
  • OJDBC-PATH - path to jar-file containing JDBC driver. It is possible to use the ojdbc6.jar file delivered in the Oracle Client distribution kit.
  • FILE - path to the configuration file where the RadixWare Starter and RadixWare Server startup parameters are defined.

The example of the configuration file content is provided below:

example.jpg [Starter]

# URI of software product upper layer

topLayerUri = org.productUpperLayer

# Address of application SVN repository and repository branch

svnHomeUrl = svn://svnServer/prod

# Authentication parameters to access SVN repository

authUser = USER

authPassword = PWD

# Parameter to force unloading of RadixWare Server-related files from SVN repository to local cache before startup

downloadServer

# Main class of application being started

appClass = org.radixware.kernel.server.Server

# Text to be displayed on start screen

showSplashScreen = Server

[Server]

# URI of DB being used

dbUrl = jdbc:oracle:thin:@databaseServer:1521/TEST

# Schema and DB user name being used

dbSchema = TEST

user = TEST

# Password for DB account; after the server is started for the first time, the parameter is deleted from the configuration file. However, the encrypted password is saved in the parameter with a different name.

pwd = TEST

# ID of system instance

instance = 1

# if it is required to create and start a new instance, specify the value in the following format: instance="new: instanceSap=1.2.3.4:5, easSap=1.2.3.4:6, scp=SCP_NAME"


# Instant start of RadixWare Server without displaying the dialog box to enter the startup parameters

autostart

[App]

# Security policy

askUserPwdAfterInactivity = 1

uniquePwdSeqLen = 4

pwdMinLen = 7

pwdMustContainAChars = 1

pwdMustContainNChars = 1

blockUserInvalidLogonCnt = 6

blockUserInvalidLogonMins = 30

pwdExpirationPeriod = 90

In the dialog box that will open, specify the database connection parameters. It is possible to define these parameters from the command line.

For RadixWare Starter and RadixWare Server startup parameters, refer to RadixWare Starter. Administrator Guide and RadixWare Server. Administrator Guide.