Listing 1: testBean.cfm
<!--- 
Document Name: testBean.cfm
Create Date: 05/09/2002
Author: Kristian Cibulskis
Changes: Drew Falkman - changed to .cfm 
from .cfc component 
--->

<!-- Create the InitialContext --->
<CFOBJECT
action=create
name=initContext
type="JAVA"
class="javax.naming.InitialContext">

<!--- Obtain a reference to the home interface --->
<cfset home = 
initContext.lookup("ShippingCalc")>

<!--- Create an instance of the session bean --->
<cfset shippingBean = home.create()>

<cfoutput>
#shippingBean.getShippingCost(
JavaCast("int",97211),
JavaCast("int",55345),
JavaCast("int",2.2),
JavaCast("string","Pony Express"))#
</cfoutput>