CREATEOBJECT: JAVA OR EJB OBJECT | |
Description
The CreateObject function can create a Java object, and, by extension, an EJB object. |
|
Returns
A Java object. |
|
Function syntaxCreateObject(type, class) |
|
Parameters
|
|
Usage
Any Java class available in the class path that is specified in the ColdFusion Administrator can be loaded and used from ColdFusion with the CreateObject function. To access Java methods and fields:
<cfset ret = myObj.init(arg1, arg2)> Calling a public method on the object without first calling the "init" method invokes a static method. Arguments and return values can be any Java type (simple, array, object). If strings are passed as arguments, ColdFusion does the conversions; if strings are received as return values, ColdFusion does no conversion. Overloaded methods are supported if the number of arguments is different. Future enhancements will let you use cast functions that allow method signatures to be built more accurately. |
TYPE | |
CLASS | |