Object serialization in ValueJavaObject

60 views
Skip to first unread message

Sergi Vladykin

unread,
Jun 15, 2012, 4:34:15 AM6/15/12
to h2-da...@googlegroups.com
Hi Thomas,

I use embedded in-memory database and want to avoid java object values serialization/deserialization. Also this will give us natural ability to sort rows by Comparable field. I understand that in general this is incorrect and insecure but what do you think if we'll add some special disabled by default flag which will switch H2 to that mode?

Sergi

Sergi Vladykin

unread,
Jun 21, 2012, 3:43:59 AM6/21/12
to h2-da...@googlegroups.com
Any comments on this?

Thomas Mueller

unread,
Jun 21, 2012, 3:49:05 PM6/21/12
to h2-da...@googlegroups.com
Hi,

I'm sorry for the delay. Yes, this would be a nice feature, not just
for in-memory databases. The easiest solution for a "feature switch"
would be a system property, but a database level setting would be
better of course.

I would probably try to use the ValueJavaObject class, maybe add a new
field "Object javaObject" there, so that this object is used instead
of the byte array if possible. The byte array would still be required
when writing / reading to / from the database file.

Regards,
Thomas
Reply all
Reply to author
Forward
0 new messages