railo

Railo And AOP Transactions

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 [...]

Tokenless location() Without Parameters

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 [...]

Groovy DataSources for Railo

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, [...]

ColdFusion vs. CFML

<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).  [...]

Goodbye ColdFusion, Hello Railo

Goodbye ColdFusion, Hello Railo

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 [...]

Moving Pic of the Day Foiled Again

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 [...]

The Latest ColdFusion Mindƒµ©Ҝ

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 [...]

Ben Nadel – At It Again

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/",
[...]

CFCOOKIE Bug in Railo

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.

Railo-147 Resolved

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 [...]