Monthly Archives: August 2008

QUICK TIP: Reload Coldspring in Coldbox without Reinitilaizing

Coldbox and Coldspring have a lot to offer when it comes to development. However, loading time is the price we pay.

There are a number of settings in Coldbox to optimize performance based on environment, but developing locally with nothing cached can drag between requests. Especially, if you are using a large number of beans with Coldspring.

If you want to trigger a reload it’s as simple as:

Where and how you use this is up to you.

May be we can get it integrated into the Coldbox Sidebar.

The ‘Opimized for Colbox’ edition of TransferSync now available

The second release of TransferSync, didn’t see any bug fixes. Instead, this edition includes some optimizations for those using Coldbox. There are no major changes to the methodology or function. Everything works the same. However, a few things have been updated to take advantage of the Coldbox cache and features to provide better performance.

Grab the latest version at

Clustered? Keep Transfer’s Cache in Sync with ActiveMQ JMS

Transfer has become almost a necessity for me these days. I recently had to deploy it on a clustered environment, and had to find a way to keep the Transfer cache between nodes in sync.

A centralized caching system like memcache would work, but a lot of refactoring would be required. Not to mention, Transfer’s cache is its claim to fame.

I turned to google, and it led me to Sean Corfield’s Blog. Where I found a number of good posts on the issue. Even some code that would do most of the dirty work for me. Score!

Almost…It didn’t support composite keys.
After I went at that, I decided to change the approach from requiring 2 gateways to just 1, and instead of 1 CFC to act as an observer and a gateway, I split them up.

The gateway gets set up in the CF Administrator. A config file is provided, and doesn’t require any modification to get you going. Once it’s running the JMS acknowledges it as a listener.

The observer gets attached to Transfer. It will trigger a method that sends a message to the JMS. The message carries the Transfer Object Class name and the ID of the Object that was either deleted or updated.

The JMS then brokers the message to all listening nodes.

That’s right, there is a catch. It requires an instance of Active MQ JMS Message Broker, on each node That’s an opensource Java Messaging Service by the Apache foundation.
It’s fairly light, taking up around 2MB RAM, and minimal CPU when at work. Not to mention, it’s default installation will get you going instantly. The best part is the auto discovery that will detect other brokers on the same network. This frees you from having to maintain the config files for the CF gateway. No need to keep an up-to-date list of IPs for the nodes. You can deploy the gateway as-is to all nodes, and let ActiveMQ do it’s thing.

The project is on RIAForge. I’ve included a sample app along with the code, for a couple reasons. If you are new to all this, then I suggest installing ActiveMQ, and using the sample app to verify everything is setup correctly. The other reason, is to provide sample code to speed up integration.