Ryan
unread,Jul 1, 2009, 10:48:19 AM7/1/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ColdBox Platform
The project I am working on will be hosted on a cluster of 2 web
servers each running Coldfusion 8 Professional, and we opted for using
client variables. (great alternative to CF enterprise)
I've written some code to create an "accessAccount" bean (cfc) for
accounts attempting to access the app, and I populate it with data
once the login is a success. I then set this bean to the client scope
via the clientstorage plugin to persist this account's data throughout
their use of the app. Since client variables stored in a database
_have_ to be simple values, I used the _serialize method in the
utilities plugin to handle that (unfortunately WDDX will not serialize
CFCs).
So everything was working fine and dandy until I decided to store a
query in my accessAccount bean. I can successfully set the query
within the bean, serialize the bean, but the problem comes when I
attempt to deserialize it. I am given a generic
"coldfusion.sql.QueryTable" error and it seems to error on the final
line of the _deserialize() method when it returns the object.
For 'S's and 'G's, I decided to test this outside of my ColdBox
environment and copied/pasted the code in the _serialize()/_deserialize
() methods. Sure enough, I received the same generic error
"coldfusion.sql.QueryTable" when attempting to deserialize the bean
containing the query.
I solved this by serializing the query itself and storing it in the
bean as a binary string, but that's an extra step I'd like to avoid if
possible. After all, I should be able to store the data in the most
native datatype.
Thoughts/comments? ...or am I "using the wrong tool"?