RE: [coldbox:18536] Re: ColdBox 3.6 - JDBC Cache Error on Railo, no issue on ACF

I would just subclass the store CFC and reference it in our config.

In theory all you need is an empty CFC (myJDBCStore.cfc) with an init() method that calls super.init() and then overrides instance.converter with your own CFC that that a deserializeObject() and serializeObject() method in it.

The API would stay the same. Depending on what you’re going to be caching, you maybe able to get away with something simpler like serializing as JSON. I think the current serialization is meant to handle anything you can throw in it such as CFCs and other complex objects. If you’re going to only put, say, strings, structs, and arrays into the cache, a simple JSON serialization might work fine and be cross-compatible.

Also, can you put in a ticket to make the JDBC store accept different convert objects as part of the config properties so you can override without subclassing?



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Hi Brad,

I have gone the approach of adding an argument to the set method (called algorithm) which allows one to override the dynamic CFML engine. I had to go through many files in the coldbox cache folder (including interfaces) to get the algorithm override to work. I have it working but now I’m faced with a CFML engine specific issue. The serializeObject function in the ObjectMarshaller now looks like this -

However, the serializeRailo() function calls a Railo native function called serialize() which is not available in ACF.

So now I’m stumped. Thoughts?

In time I may be moving to a hosted instance of EHCache, which I’ve never worked with, and I could see this scenario happening as well?

i.e App 1 on ACF serializes an object which is to be read by App 2 on Railo (or vice versa)

Interesting problem to have. (but I need to get it solved ASAP! )

May Luis knows how to proceed?