Skip Headers
Oracle® Fusion Middleware Programming Stand-alone Clients for Oracle WebLogic Server
11g Release 1 (10.3.1)
  Go To Documentation Library
Go To Product List
Go To Table Of Contents


13 Using EJBs with RMI-IIOP Clients

You can implement Enterprise JavaBeans that use RMI-IIOP to provide EJB interoperability in heterogeneous server environments:

Accessing EJBs with a Java Client

A Java RMI client can use an ORB and IIOP to access Enterprise beans residing on a WebLogic Server instance. See "Understanding Enterprise JavaBeans" in Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server.

Accessing EJBs with a CORBA/IDL Client

A non-Java platform CORBA/IDL client can access any Enterprise bean object on WebLogic Server. The sources of the mapping information are the EJB classes as defined in the Java source files. WebLogic Server provides the weblogic.appc utility for generating required IDL files. These files represent the CORBA view into the state and behavior of the target EJB. Use the weblogic.appc utility to:

The weblogic.appc utility supports a number of command qualifiers. See Chapter 9, "Developing a CORBA/IDL Client."

Resulting files are processed using the compiler, reading source files from the idlSources directory and generating CORBA C++ stub and skeleton files. These generated files are sufficient for all CORBA data types with the exception of value types (see "Limitations of WebLogic RMI-IIOP" in Oracle Fusion Middleware Programming RMI for Oracle WebLogic Server.) Generated IDL files are placed in the idlSources directory. The Java-to-IDL process is full of pitfalls. Refer to the Java Language Mapping to OMG IDL specification at

Also, Sun has an excellent guide, Enterprise JavaBeans Components and CORBA Clients: A Developer Guide, at

Example IDL Generation

The following is an example of how to generate the IDL from a bean you have already created:

  1. Generate the IDL files

    > java weblogic.appc -compiler javac -keepgenerated -idl -idlDirectory idlSources build\std_ejb_iiop.jar %APPLICATIONS%\ejb_iiop.jar
  2. Compile the EJB interfaces and client application (the example here uses a CLIENT_CLASSES and APPLICATIONS target variable):

    > javac -d %CLIENT_CLASSES%
  3. Run the IDL compiler against the IDL files built in Step 1:

    >%IDL2CPP% idlSources\examples\rmi_iiop\ejb\Trader.idl
    . . . 
    >%IDL2CPP% idlSources\javax\ejb\RemoveException.idl
  4. Compile your C++ client.