By barneyb on July 23, 2010
If you're reading this, chances are good you're a software developer. And that means you never touch the DB outside a transaction, right? Of course, right.
Most of the time, transactions are a bit of a bear because their use is orthagonal to your business tasks. To put that another way, business operations flow vertically from [...]
Posted in database, railo
By barneyb on July 8, 2010
Both Railo and ColdFusion have added a builtin 'location' function in recent versions, and like their CFLOCATION counterpart, the default behaviour is to append the jsessionid/CFIDE/CFTOKEN tuple to the URL when redirecting. I find this rather annoying, and it's even worse since FB3lite has a 'location' function which defaults it to false. Unfortunately there isn't [...]
Posted in railo
By barneyb on May 25, 2010
If you've ever wanted to do raw JDBC stuff in your ColdFusion applications, you probably know that you can get a javax.sql.DataSource via this code:
createObject("java", "coldfusion.server.ServiceFactory")
.dataSourceService.getDatasource("myDSN")
Unfortunately, this doesn't work on Railo, because the result isn't actually a javax.sql.DataSource, it just looks like one (see RAILO-43). To put that another way, it's duck typed.
Fortunately, [...]
Posted in coldfusion, groovy, railo
By barneyb on April 7, 2010
<rant>
Every time TIOBE comes out with new listings people bitch about ColdFusion. It bugs the shit out of me. Here's the deal folks:
ColdFusion is a server product. It is NOT a language. CFML is a language. You don't write ColdFusion, you write CFML and then you run your CFML on ColdFusion (or Railo, or OBD). [...]
Posted in cfml, coldfusion, personal, railo
By barneyb on March 31, 2010
I've been working towards this for quite some time, and last night I finally replaced ColdFusion with Railo on my personal server. By and large the switch went flawlessly. I made a few compatibility changes ahead of time and found and fixed a few issues subsequently, but really smooth overall. Even better, the memory footprint [...]
Posted in cfml, coldfusion, meta, railo
By barneyb on March 10, 2010
A while back I made an attempt to move Pic of the Day (NSFW) off of ColdFusion 8 and onto Railo 3. I can't afford a license of CF9, so my only upgrade path is through a free alternative. Unless someone has an extra four grand they want to give me….
Last time I was foiled [...]
Posted in coldfusion, meta, potd, railo
By barneyb on April 13, 2009
It's pretty common knowledge that ColdFusion passes arrays to UDF by value, and not by reference like pretty much every other language. It's a weird behaviour, but as long as you remember to write array-processing functions to be used like this:
<cfset myArray = modifyArray(myArray) />
instead of like this:
<cfset modifyArray(myArray) />
you'll be fine. However, someone pointed [...]
Posted in cfml, coldfusion, railo
By barneyb on April 7, 2009
Ben Nadel posted another interesting code snippet this moring. I think Ben and I stand in agreement on the technique: NEVER EVER USE IT. It leverages a horrible bug in ColdFusion's implementation of struct literals that I've blogged about previously.
Here's the snippet:
<cfset objConfig = {
root = getDirectoryFromPath(getCurrentTemplatePath()),
tags = objConfig.root & "tags/",
[...]
Posted in cfml, coldfusion, railo
By barneyb on December 2, 2008
Found another minor bug in Railo today: CFCOOKIE doesn't accept a date passed to it's 'expires' attribute. It happily accepts 'now', 'never', and a number of days, but not an actual date. Submitted as JIRA-149.
Posted in railo
By barneyb on November 27, 2008
To quote my post Tuesday about Railo bug 147:
Railo has an issue with non-defaulted, non-required, numeric method arguments that are omitted from a call. I added it as bug 147 in JIRA.
Turns out I was a bit incorrect – I'd forgotten that method was proxied by ColdSpring's AOP engine (which is exactly what's supposed to [...]
Posted in railo