Cfobject: Java Or Ejb Object - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

cfobject: Java or EJB object

Description
Creates and manipulates a Java and Enterprise Java Bean (EJB) object.
Syntax
<cfobject
type = "Java"
action = "Create"
class = "Java class"
name = "object name">
See also
cfcollection, cfexecute, cfindex, cfreport, cfsearch,
Attributes
Attribute
Req/Opt
type
Optional
action
Required
class
Required
name
Required
Usage
To call Java CFXs or Java objects, ColdFusion uses a Java Virtual Machine(JVM) that is
embedded in the process. You can configure JVM loading, location and settings in the
ColdFusion Administrator.
Any Java class available in the class path that is specified in the ColdFusion Administrator can be
loaded and used from ColdFusion, using the
To access Java methods and fields, do the following steps:
Call the
1
cfobject
Use the
2
init
<cfset ret = myObj.init(arg1, arg2)>
Calling a public method on the object without first calling the
call to the default constructor. Arguments and return values can be any Java type (simple, array,
object). ColdFusion makes the conversions if strings are passed as arguments, but not if they are
received as return values.
Overloaded methods are supported if the number of arguments is different.
Calling EJBs
To create and call EJB objects, use the
JNDI is used to register and find EJBHome instances.
Default
Description
Object type:
• com
• corba
• java
(The other object types do not take the
Create: Creates a Java or WebLogic Environment object.
Java class.
String; name for the instantiated component.
tag, to load the class. See the example code.
method with appropriate arguments, to call a constructor. For example:
cfobject
tag.
cfobject
init
tag. In the second example below, the WebLogic
cfobject: Java or EJB object
cfwddx
attribute.)
type
method results in an implicit
259

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents