778
Chapter 34: Integrating COM and CORBA Objects in CFML Applications
For example, use the following CFML to invoke a CORBA object specified by the tester.ior file if
you configured your ORB name as Visibroker:
<cfobject action = "create" type = "CORBA" context = "IOR"
class = "d:\temp\tester.ior" name = "handle" locale = "Visibroker">
When you use the
CreateObject
function to invoke this CORBA object, specify the name as the
function return variable, and specify the type, class, context, and locale as arguments. For
example, the following line creates the same object as the preceding
cfobject
tag:
handle = CreateObject("CORBA", "d:\temp\tester.ior", "IOR", "Visibroker")
For the complete
cfobject
and
CreateObject
syntax, see
CFML Reference
.
Using a naming service
Currently, ColdFusion can only resolve objects registered in a CORBA 2.3-compliant naming
service.
If you use a naming service, make sure that its naming context is identical to the naming context
specified in the property file of the Connector configuration in use, as specified in the
ColdFusion MX Administrator CORBA Connectors page. The property file must contain the
line "SVCnameroot=
name
" where
name
is the naming context to be used. The server
implementing the object must bind to this context, and register the appropriate name.
Using CORBA objects in ColdFusion
After you create the object, you can invoke attributes and operations on the object using the
syntax described in
“Creating and using objects” on page 763
. The following sections describe the
rules for using CORBA objects in ColdFusion pages. They include information on using
methods in ColdFusion, which IDL types you can access from ColdFusion, and the ColdFusion
data types that correspond to the supported IDL data types.
Using CORBA interface methods in ColdFusion
When you use the
cfobject
tag or the
CreateObject
function to create a CORBA object,
ColdFusion creates a handle to a CORBA interface, which is identified by the
cfobject
name
attribute or the
CreateObject
function return variable. For example, the following CFML
creates a handle named myHandle:
<cfobject action = "create" type = "CORBA" context = "IOR"
class = "d:\temp\tester.ior" name = "myHandle" locale="visibroker">
<cfset myHandle = CreateObject("CORBA", "d:\temp\tester.ior", "IOR",
"visibroker")
You use the handle name to invoke all of the interface methods, as in the following CFML:
<cfset ret=myHandle.method(foo)>
name
Specifies the name (handle) that your application uses to call the object's interface.
locale
(Optional) Identifies the connector configuration. You can omit this option if
ColdFusion MX Administrator has only one connector configuration, or if it has
multiple connector configurations and you want to use the one that is currently
selected in the Administrator. If you specify this attribute, it must be an ORB name
you specified in the CORBA Connector ORB Name field when you configured a
CORBA connector in ColdFusion MX Administrator; for example, Visibroker.
Attribute
Description
Summary of Contents for COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......