[Enterprise Extensions only]

Creating IDL files for an Enterprise JavaBean

Use this task to generate the interface definition language (IDL) files that specify the interface to an Enterprise JavaBean. You can then use the IDL to create client-side usage bindings for CORBA clients to use the Enterprise JavaBean's interface. You need to complete this task only if you are developing a CORBA client that needs to access an Enterprise JavaBean.

To develop the IDL files for an Enterprise JavaBean, complete the following steps:

  1. Develop the Enterprise JavaBean. For more information about developing Enterprise JavaBeans, see 4.3: Developing Enterprise JavaBeans.
  2. Ensure that the JAR file that contains the Enterprise JavaBean class can be accessed by the rmic command; for example, the JAR file should be in the system classpath.
  3. Use the Java rmic -idl command to generate IDL files from the Enterprise JavaBean's remote and home interfaces.
    For example, to generate IDL files for the Enterprise JavaBean com.ibm.ejb.samples.hello.Hello, you could use the following command:
    rmic -idl com.ibm.ejb.samples.hello.Hello com.ibm.ejb.samples.hello.HelloHome

    This step results in the class.idl and classHome.idl files. For example, for the above rmic command for the Hello Enterprise JavaBean class, created the following idl files: Hello.idl and HelloHome.idl.

You can use the IDL file to create the client-side usage bindings needed by a CORBA client, as described in Developing a C++ CORBA client.