Reality Java Interface Programming Guide

The Reality Java Interface is made up of two components: JReal and the Reality SQL/JDBC Driver.

JReal comprises

The RealSQL-JDBC Driver comprises

Overview

This programming guide provides advice for the Java programmer wishing to enquire upon or update a Reality database using one of the following methods:

  1. Extending the RSC class to call a specific Remote Basic subroutine (see Extending the RSC class). A Java program can then create an instance of this class, passing the parameters required by the subroutine.
  2. Writing Servlets to Access a Reality database via RealWeb. The servlet calls a Remote Basic subroutine by specifying a URL. By using an HTML form, the servlet can include information entered by the user in the URL, so passing this information as arguments to the subroutine. The arguments can be used, for example, to construct a query, or to update the database.
  3. Writing a Java application or applet to connect to a Reality database via the Reality SQL/JDBC interface. The Java program constructs SQL commands to execute queries or update the database. A connection to the database is established using the DDA classes.

A knowledge of Java is assumed for programmers using any of these methods. For users of Method 2, a knowledge of Java servlets and of HTML is also assumed. This guide includes links to the RealWeb help. For users of Method 3, a knowledge of Java and of SQL is assumed. When writing applets to connect via the RealSQL-JDBC driver, you need to know a reasonable amount about applet security issues, including how to sign an applet. Links are included to the SQL for Reality documentation. See also Recommended Reading.

Programmers using any method will need to use the Java Development Kit (JDK) and need to install JReal V1.0 on the client. Where Method 2 is used, it is assumed that RealWeb V3.0 is installed on the client; for Method 3, it is assumed that the Reality SQL/JDBC Driver V1.0 is installed.

This programming guide includes links to the JavaDocs for each of the Java classes used to provide the interface between Java and Reality.

Configuring JavaReal

JReal

Before you can call a Remote Basic subroutine using JReal, you must establish a connection to an account on a Reality database - you will need to use a user-id that has been set up as described in Setting up Security for External Access.

SQL/JDBC

Configuring SQL/JDBC is described in SQL for Reality - Setting Up a Working System.