Jump to Real's How-to Main page

Call a Jaguar component from Cold Fusion (CFM)

You need to install JagClient.exe on the same machine as the ColdFusion server to expose Jaguar as a COM object (Jaguar.ORB). Then you proceed like shown in this How-To.
<CFobject type="COM" name="Jag" class="Jaguar.ORB" action="CREATE" context="INPROC">
<CFSET Jag.init("")>
<CFSet anObject = Jag.string_to_object("iiop://myjaguar:9000")>
<CFSet aManager = anObject.Narrow_("SessionManager/Manager")>
<CFSet anObjectS = aManager.createSession("myuser","mypwd")>
<CFSet aSession = anObjectS.Narrow_("SessionManager/Session")>
<CFSet aFactory = aSession.lookup("MyPackage/MyComponent")>
<CFSet obj = aFactory.Create()>
<CFSET sz = obj.of_sayhello()>
<CFOUTPUT>
#sz#
</CFOUTPUT>

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]