Chapter 3 Jaguar and Application Issues
Client Application Development
If you are familiar with Jaguar, writing client applications
that use Application Integrator components is a straightforward task. Because
an Application Integrator component is defined in Jaguar as are other Java components,
the process of writing client applications will be similar to writing
applications for non-Application Integrator components.
For example, building client applications in Jaguar primarily
consists of the following steps:
- Generate the stub classes.
- Write the application logic. To write the application
logic, you must do the following:
- Instantiate proxy instances.
- Execute component methods.
- Process results.
- Handle errors.
Deploy the application.
See the Jaguar CTS Programmer's Guide for
details on how to perform these tasks.
All IDL modules for Application Integrator components are defined
with the module property com.sybase.jaguar.module.java.package set
to the Java package name that was specified for this component in
the Component Builder. Therefore, this will be the Java
package name for Java stubs generated for Application Integrator components.
When you write client applications in Jaguar, be sure you
understand the following characteristics
of Application Integrator components:
- Components
can contain one or more methods.
- Each method corresponds to a target stored procedure.
- The input and output parameters for each method
are mapped to parameters in the procedure. (Typically, only procedures
can have output parameters.)
- The return type of the method is based on whether
result sets are returned from the procedure. The number of result
sets maps to IDL statements as follows:
Number of
result sets
|
IDL mapping
|
0
|
void
|
1
|
TabularResults::ResultSet
|
More than
1
|
TabularResults::ResultSets
|
- If the target stored procedure has a return value,
it appears in the method signature as an output parameter.
- Parameters declared as nullable cause Application Integrator to
add a parameter (with the same mode as the nullable parameter) to
the method to communicate whether the corresponding parameter contains
a NULL value.
- Exceptions caught by the component are propagated
to the client stub as a user-defined exception type of AIUserException.
These exceptions contain a single field called Message that contains
the error message text for the exception.
Copyright © 1999 Sybase, Inc. All rights reserved.
|
|