BEA Logo BEA WebLogic Enterprise Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLE Doc Home   |   J2EE Programming & Related Topics   |   Previous   |   Next   |   Contents   |   Index

Using RMI in a WebLogic Enterprise Environment

The BEA WebLogic Enterprise (WLE) development platform provides remote method invocation (RMI) as one of the standard services of a Java 2 Enterprise Edition (J2EE) implementation. For this release, WLE provides its own protocol of WebLogic RMI on the Object Management Group's (OMG) industry-standard Internet Inter-Orb Protocol (IIOP). BEA WebLogic RMI on IIOP flows over an IIOP transport, so firewalls configured to support IIOP traffic will accept WebLogic RMI on IIOP messages as standard IIOP messages.

This topic explains briefly what RMI is and how it relates to J2EE programming in WLE, and describes how to develop RMI applications in a WLE environment. The documentation describes a simple Hello World sample application and also a callbacks sample application. Using RMI with Enterprise Java Beans (EJB) is also covered, along with information about how to convert existing Sun Microsystems, Inc. JavaSoft RMI classes to work in a WLE environment. The application programming interface (API) is documented, including details on how the WLE RMI API differs from the Sun JavaSoft RMI API.

      

 

Overview of RMI in WLE

What is RMI?

What is WebLogic RMI on IIOP?

What about RMI clients of EJBs?

Where can I learn more about RMI?

What software and development environment do I need for WLE RMI?

What is next?

 

Getting Started with RMI -- a Hello World Example

Where can I find the RMI Hello World example?

What is the RMI Hello World Example and what do I need to run it?

   Required Software and Environment

   Hello World Files

Building and Running the Hello World Example

Cleaning up the Directory

Understanding the Hello World Example

 

Developing RMI Applications in WLE

Setting Up Your WLE Development Environment

      Verifying/Setting Environment Variables on Windows NT

      Verifying/Setting Environment Variables on UNIX

Developing New RMI Classes for a WLE Application

   Step 1. Decide on package names and create directories for the source code that reflects the package names.

   Step 2. Write the source code for a remote interface.

   Step 3. Write the source code for a remote object that implements the remote interface.

      Defining the Remote Class

      Creating an Instance of the Remote Class

   Step 4. Write the source code for a client that invokes methods on the remote object.

      A Note about Type Narrowing

   Step 5. Compile the source code files to create the executable RMI classes.

   Step 6. Run the WebLogic RMI compiler on the implementation class to generate stubs and skeletons.

      More About Stubs and Skeletons in WebLogic RMI

      More About the WebLogic RMI Compiler (weblogic.rmic)

Building Your RMI Application in the WLE Environment

   Step 1. Create a mechanism for bootstrapping your application.

      Writing the Code That Creates and Registers an RMI Object or Factory

      Releasing the Server Application

   Step 2. Package your application into a JAR file for deployment (buildjavaserver).

   Step 3. Create a UBBCONFIG file and run tmloadcf on it to get an executable TUXCONFIG file.

   Step 4. Set application environment variables.

Running Your WLE RMI Application

Stopping the WLE Server

Using a Script as a Shortcut for Compile and Build Steps

Deploying Your Application

   Deploying the Client

   Deploying the Server

 

Using RMI with Client-Side Callbacks

Understanding Server-to-Server Communication

Joint Client/Server Applications

When do I need to use callbacks?

Example of Callbacks in RMI

   The RMI Client Interface

   The RMI Client

   The RMI Remote Interface

   The Remote Object (RMI Server)

   Running the RMI Callback Example

 

Using RMI with EJBs

EJBs and Clients of EJBs

Client Callbacks from EJBs

Clients of EJBs and WLE RMI Servers

A Note About Type Narrowing

Where can I find examples of clients of EJBs?

 

Converting Sun JavaSoft RMI to WLE RMI Classes

Step 1. Modify the Java source code files.

   HelloImpl.java -- A Remote Object Implementation

   HelloClient.java -- A Client That Invokes Methods on the Remote Object

Step 2. Compile the Java source files.

Step 3. Run the WebLogic RMI compiler on the implementation class.

Step 4. Build and package the application for WLE.

 

The WebLogic Enterprise RMI API

Overview of WebLogic Enterprise RMI Packages

Other Java Packages Related to WebLogic Enterprise RMI

What is different in WebLogic Enterprise RMI API?

   API Differences

   Connection Bootstrapping and Security Differences

      JNDI Environment Properties

      JNDI Property Keys for BEA Tuxedo Style Authentication

   Tool Differences

   Configuration Differences

 

Java Server Startup

Startup/Shutdown Classes

Jar Tool / XML

UBBCONFIG

 

Using a Startup Properties File

XML File

Properties File - startup.properties

ServerImpl Class