O'Reilly logo

Designing and Programming CICS Applications by Members of the CICS Development Team at IBM Hursley, John Horswill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing the Server Implementation Class

You create the server application by extending the base implementation class, _AccountInterfaceImplBase, which is generated by the IDL compiler as seen in Example 7-3. The class name of the server implementation must be _AccountInterfaceImpl.

Example 7-3. Code from the _AccountInterfaceImplBase Class

/**
accountObject/_AccountInterfaceImplBase.java
* Generated by the IBM IDL-to-Java compiler, version 1.0
* from accountObject.idl
* 25 February 2000 18:22:35 o'clock GMT-05:00
*/

public abstract class _AccountInterfaceImplBase extends com.ibm.CORBA.portable.
ObjectImpl implements accountObject.AccountInterface, com.ibm.CORBA.portable.Skeleton
{
  private static com.ibm.CORBA.portable.OperationDescriptor __dispatchTable[][] = new
com.ibm.CORBA.portable.OperationDescriptor[1][0];

  static {
__dispatchTable[0] = accountObject._AccountInterfaceStub._get_operations ();
  }

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
"IDL:accountObject/AccountInterface:1.0"  };
}

In the Workbench you will see that there are a number of classes and one interface created in the accountObject package. You can see the list in Figure 7-6. The interface was created as a result of the interface defined in the IDL called AccountInterface. The interface contains one method called getAccount method. We will be implementing the getAccount method in our implementation class and that is expecting to receive an account number and return the AccountData structure. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required