The amazing adventures of Doug Hughes

Archive for January, 2008

My new favorite Eclipse feature

Thanks to Brian Ghidinelli, I now have a new favorite Eclipse feature.

I know a lot of you probably know about this, but this could be one of the biggest time savers that doesn’t invovle actaully typing code. If you use ctrl+Shift+R (Sorry Mac users, I am not sure what you use in place of Ctrl, command maybe?) a window pops up that allows you to search for files in any open project. You just start typing and you will see the list of files that match what you typed, you can then select the file from the list to open it. This is a huge time saver if you are stepping into an application that you may not be familiar with, or you are working on a large application with a lot of directories and/or sub-directories.

As a runner-up , James Allen, told me of Ctrl+E, which will open a pop-up of all the open files and allows you to filter the list by entering the file name.

So, what is your favorite Eclipse feature or keyboard shortcut?

Looking For a Crystal Reports Contractor

Im trying to track down a programmer with some experience with Crystal Reports to work on contract with one of my clients. If this is you please send me a message at Or, if you know someone who might be interested please have them contact me.


Model-Glue event-hander?

Has anybody ever heard of a Model Glue “event-hander”? (Notice the misspelling of the word “handler) Apparently Model Glue 1.1 has. For a bit of background, I was recently working with an old Model Glue 1.1 application and we decided it was time to upgrade it to Model Glue Unity. Upon doing so, several of the events quit working and started giving the standard “There is no known event handler for …” error message.

For the life of me, I could not figure out why only a few events in this application “vanished”. I spent several hours tracing things, dumping errors, view states, and everything in between trying to figure out what was wrong. Finally in desperation, I started over – at least as much as I could. I create a new “test” event handler which worked just fine. Then, I started moving functionality out of one of the broken event handlers into the test one and everything still worked just fine. I even changed the name of the test event handler to match the broken event handler – and it worked.

At that point, I happened to notice the lines were different lengths between the original event handler tag and the new one I had just created. The new one looked like this:

<event-handler name="AssignCase">

and, the old one looked like this:

<event-hander name="AssignCase">

Anybody see the difference?

After finding this, I still cannot figure out how the application has been running all of this time. I went back and checked out Subversion logs and this typo had been in place for more than a year and the whole time the application worked just fine under Model Glue 1.1. I think Joe has some explaining to do here …..

ColdFusion Won't Start – What Do We Do Next?

This is a short but I hope sweet blog post with some information which has saved me a lot of grief many times. One of the many things I really love about CF is the logging capabilities. Even with all of the great tools we have at our disposal; Server Monitoring, Fusion Reactor, SeeFusion etc, I still use the logs day in and day out.

However, let’s say for instance that one day we can’t start CF and we get a message like this…

"Windows could not start the Adobe {instance-name} on local computer. For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor, and refer to service specific error code 2."

If we look to the ColdFusion logs for help, we won’t find anything because CF never started. However, usually JRun or whichever J2EE container we are using usually has logged something for us in what is known in the Java world as the std-out.log. Here is where this is located:

In an Enterprise install:


In a Standard-Server install


Where {instance-name} is the name of the instance.

My example here shows MX7 and a Windows install, just extrapolate this if that is not your specific O/S and CF version.

Don't Throw ColdFusion Out! We Can Help.

I am just going to summarize quickly what we did to tune a client CF Instance over the past week. What we did came from load-testing in our LA Lab that was carried out against the client application which had been running very slowly. This was on a Windows 2003, CF8 Enterprise install. The application was created using Model Glue, Reactor and ColdSpring. As a note point, we effected a good improvement in the application without making any code changes as yet, the improvements we got are simply from JVM-server side tweaks.

The first thing we did is add verbose garbage collection logging, this showed me that we were getting almost out of memory before a major garbage collection or Full GC. This was with the default 1.6 JVM which comes with CF8. At this point we switched to the 1.5 JVM which is recommended in some circles for “cfc-heavy” applications. This actually gave no improvement.

Analyzing the verbose garbage collection statistics we found that the permanent part of the generation, “permgen” (which is where JRun-CF sit) was running out of memory regularly. So we added a start size to permgen of 128MB and added an argument to run explicit Full GC’s every 5 minutes as with Java 1.5 and 1.6 Full GC’s do not seem to run Till we are literally almost out of memory.

I also added a start size of 512MB to the overall heap size. The permgen, by the way, is in addition to the overall heap, not part of it. I also made two changes in CF Admin, I turned off the saving of class files and turned on Trusted Cache. Trusted cache is not the beast it used to be and is well worthy of use in Production environments. The net effect was this, when I started a 90 minute 50 concurrent user load test on the client application before the changes we got these results…

  • Total Number of Clicks: 17,136 (10 Errors)
  • Average Click Time of all URLs: 7,638 ms

After the various changes shown above the same loadtests produced these results…

  • Total Number of Clicks: 26,153 (0 Errors)
  • Average Click Time of all URLs: 2,061 ms

I believe that probably 90% of CF web sites out there need to have the server/JVM tuned (actually whilst I was with Allaire-MM every server- JVM<CFMX on> to needed to be tuned). This issue is that few people look in the logs at all and if there is slowness they typically throw hardware at it and sometimes throw ColdFusion out. If you are having performance problems or if you just want to know what is going on with the JVM and Garbage Collection, ping us, we really can help.

Really Fixing Applications – Are We Inside Out?

Most web application infrastructure is far from optimally configured, I have seen that so many times in so many places in some of the World’s largest/most famous organizations. Some of that happens because, with the possible exception of network infrastructures and operating systems, companies will usually install items with the factory configured defaults and never really try to figure out what is optimal for their application needs. They never look in the core of application servers, for instance, in the logs, the configuration files.

Typically the reason is poor documentation and a general lack of good training-tutorials which creates a natural fear of touching anything. In the CF 8 World we are more fortunate than many because we have the CF Administration GUI to help in configuring and monitoring our applications. However, I still find most clients hardly touch anything beyond a few familiar settings.

In ColdFusion 8 Enterprise edition there are 167 different settings which are available via the Administrator GUI. There has never been any really effective training for this and documentation is nowhere near as complete as it is for ColdFusion development. So, typically few settings are changed from the defaults. Also, in a single CF Instance there are 151 xml files and in some cases settings cannot be changed from the GUI but need to be changed manually, for instance, adding metrics logging.

It is also unfortunate that many do not even look at CF or JRun logs and in lots of cases I had clients who did not know they even existed. The net results of all these things is that in trying to fix a slow or unresponsive application most people I had been sent to help typically look first in the code.

There is no doubt that there are often problems in the code but if the server core, the “engine” is not tuned properly, we are actually starting in the wrong place by looking in the code. Here at Alagad we are focused on increasing knowledge of the server side. We have already blogged several times around that subject and will continue to do so. In addition will shortly be launching two new service offerings which at the same time as helping to fix problems will also help all of us to learn more about “the engine room”. These offerings are:

  • Alagad Log Analytics – we will scour your logs and give you a report pinpointing potential and/or actual problems. We will also transfer our years of knowledge about log management and analysis to you.
  • Alagad Garbage Collection Analytics – in this offering we will work with you to configure verbose garbage collection logs and then analyze the results making and explaining the reasons, again another point of knowledge transfer. Efficient Garbage Collection is the key to highly efficient J2EE application servers.

In the longer term we are also looking at developing training sessions for all aspects of server management and optimization, including a good meaty session on ColdFusion Administration. Keep an eye on our blog, we really are dedicated to passing on our knowledge.

Is This Domain Name Fraud?

On Monday I was looking for a new domain name for a friend of mine and I searched and found all main extensions were available; .com, .net, .org. So I told my friend and early on Tuesday we went to purchase the .com and .net versions. To our surprise the .com version had been registered the day before and in Whois it was shown as client parked and registered by the largest most expensive registrar on Monday. Everywhere else I tried it was shown as taken and in one case it had a flag saying “Make an Offer”.

So for curiosities sake I went to the largest most expensive registrar’s site and searched for .com version and hey-presto, it was available. My friend wanted the .com version so I went ahead and bought it. The cost was over twice that of the nearest competitor. Today, Crystaltech, whom I have a lot of respect for, emailed their clients pointing out that they suspected exactly what I suspected might be happening.

When someone searches for availability on a Domain Name it is being purchased/held directly after that search by a registrar and either being offered for sale or being made available by the largest most expensive registrar. If this is what is happening I don’t know if it is legally fraud but is is certainly very unethical. Hat’s off to Crystaltech for trying to protect and warn their clients.

Tag Cloud