Generating business object definitions

This section describes how to use the CORBA ODA in Business Object Designer to generate business object definitions. For information on launching and using Business Object Designer, see IBM WebSphere Business Integration Adapters Business Object Development Guide.

Starting the ODA

The ODA can be run from any machine that can mount the file system on which the metadata repository (that is, the IDL files) resides, using the start_CORBAODA.bat (Windows) or start_CORBAODA.sh (Unix) start file. This file contains start parameters, including the paths to certain required CORBA and connector .jar files. These .jar files must also be accessible from the machine on which you are running the ODA.

The ODA for CORBA has a default name of CORBAODA. The name can be changed by changing the value of the AGENTNAME variable in the start script.

To start the ODA, run this command:

Running Business Object Designer

Business Object Designer provides a wizard that guides you through the steps to generate a business object definition using the ODA. The steps are as follows:

Select the agent

You must first select the ODA agent.

  1. Start Business Object Designer.
  2. Click File > New Using ODA. The Business Object Wizard - Step 1 of 6 - Select Agent screen appears.
  3. Select the ODA/AGENTNAME (from the start_CORBAODA script) in the Located agents list and click Next. (You may have to click Find Agents if the desired agent is not listed.)

    Figure 14. Select Agent screen

Configure the agent

After you click Next on the Select Agent screen, the Business Object Wizard - Step 2 of 6 - Configure Agent screen appears. Figure 15 illustrates this screen with sample values.



Figure 15. Configure Agent screen

The properties you set on this screen are described in Table 15. You can save all the values you enter on this screen to a profile. Instead of retyping the property data next time you run the ODA, you simply select a profile from the drop-down menu and re-use the saved values. You can save multiple profiles, each with a different set of specified values.


Table 15. Configure Agent properties

Property name Default value Type Description
IDLFileDirectory None String (required) The directory where the IDL files are located. All the IDL files that define the CORBA interface must be placed in this directory.
GenerateProxies True Boolean (required) When set to true, generates the required proxy object classes. When set to false, the adapter uses the .jar file of a CORBA application vendor instead of generating the .jar file of proxy object classes. Make sure to specify the CORBA application vendor's file name in the JCLASSES setting in the start_CORBA.bat (Windows) or start_CORBA.sh (Unix) file.

If you are creating server-side objects for a connector that runs as a server, this property is ignored and the ODA generates server implementation classes. This allows you to use the proxy class definitions provided in a .jar file of a CORBA application vendor, instead of generating your own.

JarFileName None String The name of the .jar file in which the classes generated by the ODA will be stored. If you specify a file name only (no path), the ODA uses the value you specify in OutputFileDir as the directory in which to output this file. If you specify the absolute path (directory and .jar file name) here, the ODA ignores the value you specify in OutputFileDir. This property is required when the GenerateProxies property is set to true.
BOPrefix None String The prefix that the ODA will add to the names of the business objects it generates. In Figure 15, all business objects that the ODA generates, will have names that start with myBO_.
CORBAServerImpl False Boolean (required) When set to true, the ODA generates server-side business objects and implementation class definitions for server-side processing (to be used when the connector runs as a server). If you also want to generate client-side business objects for the same CORBA IDL objects, run the ODA again with this property set to false.
IDLToJavaTool None String The absolute path of the IDLJ compiler tool.
CORBAClassPath None String (optional) The semicolon delimited (Windows) or colon-delimited (Unix) string that contains the pathname of the external CORBA infrastructure class files. These .jar files are required to successfully compile the proxy class definitions. The value of this property is temporarily appended, whenever you run the ODA, to the class path used by the ODA. Set this value explicitly to include all JAR files or directories needed to compile CORBA classes, including any generic CORBA classes such as those defined in ibmorb.jar (the jar file required by the IBM Java ORB).
OutputFileDir None String (required) Directory in which to store all output files generated by the ODA. If you set the GenerateProxies property to false, the ODA does not create a JAR file (JarFileName property) in which the ODA-generated classes are stored. Instead, the classes are saved as separate output files in the directory you specify here. This is a working directory, so as a precaution, make sure each time you run the ODA that the directory you specify here does not already contain any files.
JDKHomeDir None String (required) The directory in which the JDK is installed on this machine.
TraceFileName None String The name of the trace message file; for example, CORBAODAtrace.txt.
TraceLevel 5 Integer (required) The tracing level (from 0 to 5) for the Agent. For details about tracing levels, see Tracing.
MessageFile None String (required) The name of the message file that contains all the messages displayed by the ODA. For CORBA, the name of this file is BIA_CORBAODAAgent.txt. If you do not correctly specify the name of the message file, the ODA will run without messages.

  1. Use the New and Save buttons in the Profiles group box any time you want the ODA to create a new profile. When you use the ODA again, you can select an existing profile.
  2. Type the value of each property, as defined in Table 15.
    Note:
    If you use a profile, the property values are filled in for you, though you can modify the values as needed. You can also save new values.

Select a business object

The Business Object Wizard - Step 3 of 6 - Select Source screen appears, as illustrated in Figure 16. The screen lists the interfaces and structs that have been defined in the CORBA IDL file. Use this screen to select any number of CORBA entities for which the ODA will generate business object definitions. A high level parent entity is always an interface or a struct. A sub object of the high-level parent can be an interface, struct, union, enum, or sequence. A descendent union, enum, or sequence is automatically generated as a business object when you select any of its interface or struct ancestors (parent or higher level).

Note:
A descendent interface or struct is only generated if you explicitly select it. In other words, it is not automatically generated simply because an ancestor has been selected.

To determine which CORBA objects listed on this screen are child objects of a high-level object, refer to the original IDL file. You can also simply select all the CORBA objects listed on this screen and generate their corresponding business objects. The resulting business objects will reflect the parent-child relationships.

For details about the CORBA structures for which you can create business objects, see Table 7.

Figure 16. Select Source screen

  1. If necessary, expand a CORBA module to see a list of sub objects.
  2. Select the CORBA object(s) you want to use. In Figure 16, the Hello object is selected
  3. Click Next.

Confirm the object selection

The Business Object Wizard - Step 4 of 6 - Confirm source nodes for business object definitions screen appears. It shows the object(s) you selected.



Figure 17. Confirm source node screen

Click Back to make changes or Next to confirm that the list is correct.

The Business Object Wizard - Step 5 of 6 - Generating business objects... screen appears with a message stating that the wizard is generating the business objects.

Copyright IBM Corp. 1997, 2004