Compiling stubs

For each IDL interface that is assigned to a component, the Adaptive Server plug-in generates a Java interface with the same name as the IDL interface, a stub class that implements that interface, a helper class, and a holder class. For example, for an IDL interface named Calculator::Calc, the Adaptive Server plug-in creates the source files listed in the following table:

Table 7-1: Java stub source files for example interface calc

File name

Purpose

Calc.java

Defines an interface with methods equivalent to the component’s methods.

Calc_Stub.java

Class that implements the interface.

CalcHolder.java

Used when interface references are passed as an inout or output parameter.

The Adaptive Server plug-in creates stubs for each interface and datatype defined in a module. If your component references a module that contains multiple interfaces, you will find that additional stub files are generated besides the stubs for the interfaces that are directly implemented by your component.

Compile the stub classes with a JDK 1.2 compiler. Make sure that the CLASSPATH setting contains the code base directory and the EJB Server html/classes subdirectory. For example:

set CLASSPATH=%SYBASE\SYBASE_EJB%\html\classes;
%SYBASE\SYBASE_EJB%\java\classes;%SYBASE\SYBASE_EJB%
javac *.java