
Chapter 3 EAServer and Application Issues
Client application development
If you are familiar with EAServer, writing client applications
that use Application Integrator components is a straightforward
task. Because an Application Integrator component is defined in
EAServer as are other Java components, writing client applications
is similar to writing applications for non-Application Integrator
components.
For example, building client applications in EAServer consists
of the following steps:
- Generate
the stub classes.
- Write the application logic, including:
- Instantiate proxy instances.
- Execute component methods.
- Process results.
- Handle errors.
- Deploy the application.
See the EAServer Programmer's Guide for
details on 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 is also the Java
package name for Java stubs generated for Application Integrator
components.
When you write client applications in EAServer, you should
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 © 2001 Sybase, Inc. All rights reserved.
|
|