Saturday, August 10, 2002

Time for developers to consider a hardware upgrade?

I thought I'd share a recent experience. I'd been running a Dell Ispiron 5000 as my development workstation for a year or two, when I decided to upgrade it. Then I upgraded yet again to a new workstation. The differences in the experience of working day to day on the machines has gotten so much better each time. I know it may seem obvious that this would be so, but I wonder how many others have been lulled into a false sense that they're machines are performing acceptably. Sometimes, you really don't know what you're missing.

With hardware upgrades being so cheap these days, I thought I'd share my experience for the benefit of others who may not have considered it. The first was a few months ago, the second last week.

My laptop was a 650mhz p4 with 192m of ram. After having CF5, JRun (3, then 4), CFMX, etc running as services (I know, I could avoid that and run them only as needed), then adding Studio and Outlook running pretty much all the time, and Word, Powerpoint, etc running occasionally, well, the machine was getting sluggish. Some operations were starting to take a couple to a few seconds, but since they were frequent, it became noticable.

My first upgrade was to add 256meg of memory for a total of 448. That really made quite a difference. Clearly, there was some os swapping going on that was hurting me. It was almost like the difference back in the old days of upgrading a win 3.1 machine from 16 to 32 meg. :-) Seriously, it was a very worthwhile upgrade for less than $50.

Then I happened to look at the docs for CF5 and saw that the minimum requirements for enterprise were 256mb with 512 preferred, and then figuring all else I had, it made sense that I needed to add more. So let this be a lesson. We may tend to think our machines that were hot a couple years ago are still capable. Think again.

Then, I was forced recently to get a new workstation. I chose just a no-name clone but with a p4 @ 2ghz, a gig of ram, and an 80g hard drive. My word, what a difference. Of course, some will say that a workstation will always outclass a laptop, but Dell laptops have been quite good as reasonable desktop replacements. And maybe an equivalent upgrade to a new laptop might have been just as imprssive. The new machine's running xp pro over my laptop's win2k pro. I've enjoyed that experience as well. Lots of nifty things in XP (automatic system restore points set at install of software to name just one--don't know if that's pro only). Everything's running fine on it (no weird hardware whose compatibility I need to worry about).

Anyway, I just want to share the experience that regardless of your current platform, you may find that a $1000 for a machine configured with a good bit more horsepower may really improve your day to day experience as a CF developer if what you've got it anything more than a couple years old.

Locking in CFMX

Curious about whether you do or don't need to do locking in CFMX? It's not that you no longer need to at all, just that you don't need to as often as you used to. The purposes of CFLOCK are now basically in line with what locking or synchronization are in any multi-threaded language. Check out this KB article at MM:

Setting up CFMX on Mac OS X

Many may have heard that CFer Dick Applebaum had been doing a 3 part series on setting up CFMX on a Mac OS X. The third and key part has finally been posted, at

Thursday, August 08, 2002

Saving Java code produced by CFMX in source form

Did you know that you can ask CFMX to save in source form the Java code it creates when compiling CFMX templates?

You do so by setting the parameter "coldfusion.compiler.saveJava" to TRUE in <cfmx_home>/wwwroot/WEB-INF/web.xml. Then restart the server.

Files are then saved as .java files in <cfmx_home>\wwwroot\WEB-INF\cfclasses\ directory. Be warned, though, the file names may not be apparent:

Setsession.cfm becomes

Also, there's no obvious distinction between classes from templates of the same name in different directories.

Anyone Else Notice the "Server Reports" Feature Missing in CFMX

Folks, I was surprised to discover today that the CF5 Enterprise Administrator feature called "Server Reports" is no longer available in CFMX (Enterprise/Trial/Developer editions).

It allowed you to monitor the CF performance statistics (those written to the NT Performance Monitor from within CF), providing a web-based interface that had some benefits over CFSTAT in some cases. Fortunately, that's still availalable, but I'd not seen any documentation of the removal of Server Reports. I just observed it today for the first time.

Wednesday, August 07, 2002

Enabling dynamic class reloading in CFMX

By default, CFMX will NOT dynamically reload changed servlets and CFOBJECT classes. This is a performance optimization. In a development environment, you may want to change that.

In the file [cfmx_home]\wwwroot\WEB-INF\jrun-web.xml, add the following line within the existing <jrun-web-app> element:


Restart the server. CFMX will now reload classes from [cfmx_home]\wwwroot\WEB-INF\classes as well as classes in jar/zip archives in [cfmx_home]\wwwroot\WEB-INF\lib.

Note: The [cfmx_home]\wwwroot\WEB-INF\classes directory must contain class files only, not class archives. Java class archives belong under the [cfmx_home]\wwwroot\WEB-INF\lib directory


I forgot to mention the true option as well. This will cause CF to automatically compile classes as well, when the class is requested. This is really a neat option since when compiling things yourself you need know how to get to the command line, run the java compiler, remember to provide the same classpath that CFMX would use when running the class, then remember to put the file in the correct directory. With this autocompile feature, CF not only does the compile for you but also uses its classpath and compiles it right where the source code exists. So for working with servlets, for instance, just put your servlet right in the WEB-INF/classes directory and call it, and CF will compile it for you if it's not already been compiled. And if it's been changed since last compiled and the reload and compile options are enabled, it will both compile and reload it. Nifty!

Comments and Corrections for CFMX Docs on Sandbox/Resource Security

In preparing for an upcoming article I'm doing on Sandbox/Resource Security (they're not quite the same thing) for the MM DesDev Center, I've found many misstatements and sources of misinformation in the CFMX docs on the subject. For more info, see the comments at the bottom of the relevant pages for these docs at, "Administering CFMX" book (Chapter 4) and "Developing CFMX Apps" book (Chapter 16).

And look for the complete article clarifying the distinctions and providing how to's and more at the DesDev site in the future. I'll likely post some pertinent observations here as well.