Serialize of ORM Entities

Hi there,

we have a clusted couchbase caching server and want to cache the result of the search/find functionality of the VirtualEntityService.
It’s just possible to store strings within this clusted couchbase, so for complex types the couchbase providers tries to serialize the data.
For ORM entity this fails with following exception: “java.io.NotSerializableException:railo.runtime.util.VariableUtilImpl”

Is there any oppertunity the store it to couchbase without losing orm functionality?

Kind regards,
Matze

Don’t try to do your own persistence on ORM entities. Ever.

Instead, use the second level caching built into Hibernate. Here’s a blog on how to set up Couchbase for second level caching in CF ORM via a Memcached provider.

https://www.ortussolutions.com/blog/couchbase-secondary-orm-configuration-setup

Thanks!

~Brad

Any alternatives to that? If you can not ensure that there is second level cache enabled.

Sticky sessions would probably be the only other way.