turn off auto-serialization

#1

Hi 

 

As far as I understand if you have a classe that implements Serializable and is referenced by an Entity it will be automatically stored using standard serialization mechanizm. 

Is there any option to turn off that feature so that if an un-enhanced (Serializable) class is referenced an error will be printed ??

 

Thanks in advance

b

#2

That is a good point - falling back to serialization (automatically, unintentionally) causes a lot of problems. Version 2.2.9 adds a new configuration and now serialization (which should usually be avoided) is disabled by default.

 

ObjectDB Support
#3

this option is very helpfull, thank you, but it seems that can not be turned on, I always get exception:

 

Attempt to store an instance of a non persistable type java.lang.Class (error 303) regardles config settings :

<persist serialization="true" />

 

moreover that exception is raised before any preStore callback or listener so I could not check field structure and I'm unable to change for example instance of Class into their names in jdoPreStore() callback

Tomasz

#4

Strange. ObjectDB tests that are integrated in the build process include using serialization, and actually only when the configuration is changed to true the build passes.

Please verify that you changed the correct configuration file. If you have separate configuration files for the server and the client - notice that this setting has to be changed on the client side.

The exception should be thrown after jdoPreStore, at least if the class is enhanced.

ObjectDB Support
#5

 

 Yes, you are right, wrong config file and I waited for callback i embeded entity, my fault.

 

Reply