Welcome!

Java Authors: Maureen O'Gara, Bruce Armstrong, Liz McMillan, Walter H. Pinson, III, Yakov Werde

Related Topics: ColdFusion

ColdFusion: Article

Adobe ColdFusion 8 Tips

A compilation of Ben Forta's blog entries from his ColdFusion 8 user group tour

The previous example spawns a thread that could continue processing long after the parent page terminates. If you needed to wait for a thread to complete, you could use the following code:

<cfthread action="join" name="threadFile">

JOIN is used to wait for one or more threads to complete, and multiple thread names may be specified (as may a timeout value).

Once defined, the thread name can be accessed as a structure that exposes the following members:

  • ELPASEDTIME is the amount of time since the thread was spawned.
  • ERROR contains any error messages generated by the code in the spawned thread.
  • NAME is the thread name.
  • OUTPUT contains any generated output. This output will not be sent to the client, but parent page code can access the output that can then be used as needed.
  • PRIORITY is the thread priority level (HIGH, LOW, NORMAL).
  • STARTIME is the time the thread started.
  • STATUS is the thread status (NOT_STARTED, RUNNING, TERMINATED, COMPLETED, WAITING).
To check that threads executed properly without errors, you could JOIN the threads, and then check STATUS to see if they completed. A status of TERMINATED means an error occurred (or that threads were explicitly terminated), in which case ERROR would provide details as to what happened.

ZIP and JAR File Access in ColdFusion 8
During the usergroup presentation at the Mid-Michigan CFUG in East Lansing, I mentioned another new ColdFusion 8 tag, one we haven't yet discussed publicly; this tag will now appear last in alphabetical CFML tag listings. <CFZIP> provides access to ZIP and JAR files, supporting the following actions:

  • DELETE deletes one or more files from an archive file.
  • LIST lists the contents of an archive file.
  • READ reads the contents of an archived file into a variable.
  • READBINARY reads the contents of a binary archived file into a variable.
  • UNZIP extracts files from an archive file.
  • ZIP compressed files into an archive file.
A child <CFZIPPARAM> tag is also supported as an optional way to provide file names and other attributes.

Roundup
Everyone is excited about ColdFusion 8; the blogs have been buzzing, feedback has been superb, lots of attendees expressed relief and gratitude at seeing such a compelling ColdFusion built in this new Adobe era - no complaints, no negative feedback, just real enthusiasm and excitement. The only frequently heard complaint was from users who want it now!

More Stories By Ben Forta

Ben Forta is Adobe's Senior Technical Evangelist. In that capacity he spends a considerable amount of time talking and writing about Adobe products (with an emphasis on ColdFusion and Flex), and providing feedback to help shape the future direction of the products. By the way, if you are not yet a ColdFusion user, you should be. It is an incredible product, and is truly deserving of all the praise it has been receiving. In a prior life he was a ColdFusion customer (he wrote one of the first large high visibility web sites using the product) and was so impressed he ended up working for the company that created it (Allaire). Ben is also the author of books on ColdFusion, SQL, Windows 2000, JSP, WAP, Regular Expressions, and more. Before joining Adobe (well, Allaire actually, and then Macromedia and Allaire merged, and then Adobe bought Macromedia) he helped found a company called Car.com which provides automotive services (buy a car, sell a car, etc) over the Web. Car.com (including Stoneage) is one of the largest automotive web sites out there, was written entirely in ColdFusion, and is now owned by Auto-By-Tel.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
turbotad 07/02/09 11:42:00 PM EDT

Question: I'm pretty new to ColdFusion, but am more experienced running J2EE type boxes. I'm trying to set up a ColdFusion dev server on a VM with limited memory, and I'm trying to trim it back so that it doesn't pork out and use every bit of memory on any computer within a 10 mile radius. I.e. trying to get it so that it perhaps doesn't fire up all of the Flash remoting servlets or other things I don't need for basic CF functionality, in hopes that this might trim back the RAM usage. Any help you might be able to be on this?