User Guide

Table Of Contents
Creating and using CORBA objects 961
<!--- Convert a Word document in temp.doc to an HTML file in temp.htm. --->
<!--- Because this example uses a fixed filename, multiple pages might try
to use the file simultaneously. The lock ensures that all actions from
reading the input file through closing the output file are a single "atomic"
operation, and the next page cannot access the file until the current page
completes all processing.
Use a named lock instead of the Application scope lock to reduce lock
contention. --->
<cflock name="WordObjLock" type="exclusive" timeout="120">
<cfset docs = application.mywordobj.documents()>
<cfset docs.open("c:\CFusionMX7\wwwroot\temp.doc")>
<cfset converteddoc = application.mywordobj.activedocument>
<!--- Val(8) works with Word 2000. Use Val(10) for Word 97 --->
<cfset converteddoc.saveas("c:\CFusionMX7\wwwroot\temp.htm",val(8))>
<cfset converteddoc.close()>
</cflock>
<cfoutput>
Conversion of temp.htm Complete<br>
Execution Time: #int(getTickCount()-start)# milliseconds<br>
</cfoutput>
Getting started with CORBA
The ColdFusion cfobject tag and CreateObject function support CORBA through the
Dynamic Invocation Interface (DII). As with COM, the object's type information must be
available to ColdFusion. Therefore, an IIOP-compliant Interface Repository (IR) must be
running on the network, and the object's Interface Definition Language (IDL) specification must
be registered in the IR. If your application uses a naming service to get references to CORBA
objects, a naming service must also be running on the network.
ColdFusion loads ORB runtime libraries at startup using a connector, which does not tie
ColdFusion customers to a specific ORB vendor. ColdFusion currently includes connectors for
the Borland Visibroker 4.5 ORB. The source necessary to write connectors for other ORBs is
available under NDA to select third-party candidates and ORB vendors
You must take several steps to configure and enable CORBA access in ColdFusion. For detailed
instructions, see Installing and Using ColdFusion MX.
Note: When you enable CORBA access in ColdFusion, one step requires you to start the Interface
Repository using an IDL file. This file must contain the IDL for all the CORBA objects that you invoke
in ColdFusion applications on the server.
Creating and using CORBA objects
The following sections describe how to create, or instantiate, a CORBA object and how to use it
in your ColdFusion application.
Creating CORBA objects
The
cfobject tag and CreateObject functions create in ColdFusion a stub, or proxy object, for
the CORBA object on the remote server. You use this stub object to invoke the remote object.