Life Cycle Of Java Cfxs; Calling The Cfx From A Coldfusion Page - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

396
The default value is
reload="Always"
always have the latest class files, even when only a dependent class changed. Use
reload="Never"
Note
The
ColdFusion server loads classes located on the Java class path once per server
lifetime. You must stop and restart ColdFusion Server to reload these classes. For
information on loading Java class files, see "The class loading mechanism" on page
384.

Life cycle of Java CFXs

A new instance of the Java CFX object is created for each invocation of
tag. This means that it is safe to store per-request instance data within the members
of your
instances of your
ensure that all accesses to the data are thread-safe.

Calling the CFX from a ColdFusion page

You call Java CFXs from within ColdFusion pages by using the name of the CFX that
is registered on the ColdFusion Administrator CFX tags page. This name should be
the prefix
following CFML page calls the
<html>
<body>
</body>
</html>
To test the CFX
1
2
3
4
reload="Auto"
during the development process when you must ensure that you
to increase performance by omitting the check for changed classes.
attribute applies only to class files located in the
reload
object. To store data and/or objects that are accessible to all
CustomTag
CustomTag
followed by the class name (without the .class extension). The
cfx_
<cfx_HelloColdFusion NAME="Les">
:
Create a new source file in your editor and enter the preceding CFML code.
Save the file in a directory configured to serve ColdFusion pages. For example,
you can save the file as C:\inetpub\wwwroot\cfdocs\testjavacfx.cfm on Windows
NT or /home/docroot/cfdocs/testjavacfx.cfm on UNIX.
If you have not already done so, register the CFS in the ColdFusion
Administrator, as described in "Registering CFXs" on page 404.
Request the page from your Web browser using the appropriate URL; for
example:
http://localhost/cfdocs/testjavacfx.cfm
Chapter 21 Building Custom CFXAPI Tags
. This is appropriate for most applications. Use
, use static data members. If you do so, you must
HelloColdFusion
classes
custom tag:
directory. The
he Java CFX
t

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents