Using CORBA


The Common Object Request Broker Architecture (CORBA) is another distributed object technology. This technology is spearheaded by the Object Management Group (OMG) and is more of a community standard than is COM.

However, unlike many community standards, CORBA is a pretty expensive choice for implementing objects. Most ColdFusion developers do not use CORBA as a way to extend ColdFusion. However, for organizations that have already made an investment in CORBA, ColdFusion provides an easy way to extend and interact with that technology.

If you need to use ColdFusion with CORBA, you can interact with the CORBA objects by using <cfobject>, like this:

 <cfobject action="connect"                      name="objAccount"           type="CORBA"           context="IOR"> 

This code is a simple banking example. After you tell ColdFusion which CORBA server to access, as in the previous code, and what to name the object to reference, you can set and retrieve attributes, as follows:

 <!--- setting an attribute ---> <cfset objAccount.long_attrib="43453"> <!--- retrieving an attribute ---> <cfset balance=objAccount.balance()> 

Because you've written the account balance attribute into a ColdFusion local variable, you can use the results of the CORBA statement in any way that you want.

Local variables are introduced in Chapter 2, "Working with Variables and Expressions."




Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net