Entering content frame

Component documentation Developing an RMI-IIOP Callback Application Locate the document in its SAP Library structure

Purpose

This tutorial is intended to describe the process of designing, implementing and assembling and deploying an RMI-IIOP server application using the SAP NetWeaver Developer Studio. It shows how you develop both Java and CORBA clients that use the application.

Although it is quite simple to implement, this application depicts a more complex scenario involving bi-directional communication between the client and server application parts. That is, the server-side application makes remote calls back to the client and includes the results from the callbacks into the response to the client (the client behaves as a server-side remote object during the callbacks).

Application Calls Flow

This graphic is explained in the accompanying text

Summary of the Implementation Steps

The implementation of the server-side application starts with the development of the remote object – in our example, this is a stateless session bean. The callback object is represented on the server-side by a remote interface declaration (that is, an interface that extends the java.rmi.Remote interface, or any other interface that inherits the latter). Since the bean performs remote calls on methods of the callback object, it must possess the corresponding stub class. Therefore, you must generate a stub class for the callback object and insert it into the server-side application archive.

The next significant implementation step is to generate the IDL based representation of the enterprise bean and the callback object. Having the IDL files is a prerequisite that later helps you to develop the client application in different programming languages. In our example, we develop a C++ CORBA client, and a Java one. Using an appropriate IDL compiler, you get the source code files in the programming language you are about to use to develop the client application.

Note

The IDL compilers must be provided by the vendor of the ORB that you use on the client-side.

The last implementation step is to implement the client that calls the enterprise bean.

Objectives

By the end of this tutorial, you will be able to:

·        Understand the general process flow when developing RMI-IIOP applications.

·        Implement remote objects that have methods that are passed objects rather than simple data type parameters.

·        Develop CORBA clients written in a programming language other than Java, based on the IDL representation of the server-side remote object.

·        Use the standard rmic tool (provided with your Java Development Kit (JDK) software) to generate client stubs for IIOP communication and IDL files out of the Java source files of the remote objects in the application.

·        Obtain a reference to the remote object from the client.

·        Deploy the server-side application using the SAP NetWeaver Developer Studio and generate IIOP support for it using the Visual Administrator tool.

Prerequisites

Systems, Installations, and Authorizations

·        The SAP NetWeaver Developer Studio, version 2.0.4 is installed on your computer.

·        You have access the SAP J2EE Engine and necessary authorizations to perform deployment on it.

·        You have started the IIOP Provider Service on both the Java dispatcher and the server process. By default, this service is stopped and must be started manually.

·        You have launched the Visual Administrator tool and have connected it to the SAP J2EE Engine.

·        You have the JDK version 1.4.x installed on your computer.

Caution

This example will not work with JDK versions 1.3.x or lower!

·        You have installed Object Request Broker (ORB) software on the client side. Throughout this tutorial, we used the ORBacus product.

·        You have Microsoft Visual Studio installed on your computer to use for the C++ CORBA client development.

Knowledge

·        Java knowledge and basic knowledge of the EJB 2.0 programming model.

·        C++ knowledge necessary for the development of the CORBA client.

·        You have acquired basic experience with the J2EE toolset in the Developer Studio, for example by working through the Tutorial Creating Your First J2EE Application.

·        At least basic knowledge of the RMI-IIOP and CORBA/IDL technologies. For more information about these, see RMI-IIOP.

Next Step:

Defining the Callback Object

 

 

Leaving content frame