User Guide

376 Chapter 20 Using cfobject to Invoke Component Objects
Getting Started with CORBA
The ColdFusion cfobject tag supports CORBA through the Dynamic Invocation
Interface (DII). As with COM, the objects type information has to be available to
ColdFusion. This requirement implies that an IIOP-compliant Interface Repository
(IR) should be running on the network, and that the objects Interface Definition
Language (IDL) specification must be registered in the IR.
ColdFusion 5 loads ORB runtime libraries dynamically using a connector.
Macromedia provides connectors for some of the popular ORBs. Each of these
connectors requires the ORB runtime libraries provided by the vendor. You must
license the libraries from the appropriate vendor before deploying them. You
manage the connectors on the CORBA Connectors page of the ColdFusion
Administrator Server tab. Using this page, you can add a connector and specify the
location of the ORB library. For more information, see Installing and Configuring
ColdFusion Server.
Calling CORBA Objects
In the cfobject tag, you must specify the following attributes when calling CORBA
objects:
Set the
type attribute to CORBA. If no type is specified, COM is assumed.
The context attribute shows how the object reference is obtained. Set context to
IOR for a file containing the objects unique Interoperable Object Reference or to
NameService.
If you set the context attribute to IOR, set the class attribute to the file
containing the stringified version of the IOR. ColdFusion must be able to read
this IOR file at all times, so make it local to the server or on the network in an
accessible location.
If you set the
context attribute to NameService, the class attribute must include
a period-delimited name, such as MyCompany.Department.Dev. Currently,
ColdFusion can only resolve objects registered in a CORBA 3.0-compliant
naming service. Make sure that the naming service (NS) is brought-up with a
default naming context. The server implementing the object should bind to the
default context, and register the appropriate name. ColdFusion also binds to the
default context to resolve the name.
Set the
name attribute to the name that your application uses to call the objects
operations and attributes.
For the complete cfobject syntax, see the CFML Reference.
Declaring structures and sequences
After you create the object, you can invoke attributes and operations on the object
using the syntax outlined in the previous sections. ColdFusion also supports the use
of complex types such as structures and sequences. For structures, use ColdFusion
structures; for sequences, use ColdFusion arrays.