Adobe COLDFUSION 9 Manual page 1188

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
<cfobject type="com"
</cfcatch>
</cftry>
<cfset Application.mywordobj.visible = False>
</cfif>
</cflock>
</cfif>
<!--- Convert a Word document in temp.doc to an HTML file in temp.htm. --->
<!--- Because this example uses a fixed filename, multiple pages could 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:\CFusion\wwwroot\temp.doc")>
<cfset converteddoc = application.mywordobj.activedocument>
<!--- Val(8) works with Word 2000. Use Val(10) for Word 97 --->
<cfset converteddoc.saveas("c:\CFusion\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.
configuring and enabling CORBA access in ColdFusion requires several steps. For detailed instructions, see Installing
ColdFusion.
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.
action="Create"
class="Word.application"
name="Application.MyWordobj"
context="local">
Last updated 8/5/2010
1183

Advertisement

Table of Contents
loading

Table of Contents