Replies: 3 comments
-
Hi Sergei, Can you describe your use-case at a higher level? What would your Slice definitions look like?
By Ice objects, you mean instances of Slice classes? Note that the "preservation" of unknown derived "slices" of a class instance during decoding was introduced in encoding 1.1. Encoding 1.0 does not support this feature. Are you sure you need to support encoding 1.0? Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi Bernard, Thanks for quick reply. We upgrade Ice from 3.4.x to 3.7.8 version. We stage our system upgrade few apps at a time. Version 1.0 encoding has been chosen for backward compatibility; all will be upgraded to version 1.1 encoding once all app are upgraded. Below works in Ice 3.4.x :
Above used to read unknown object into sequence of slices as blobs, that then got sent back upon request written into the stream in same order. Thanks a lot, |
Beta Was this translation helpful? Give feedback.
-
Hi Sergei, So with OpaqueSlicedObject, you implemented your own "unknown/opaque class instance preservation" with Ice 3.4. I just double-checked there is no such class in Ice 3.4. Pretty advanced. The 1.0 encoding for classes did not change (obviously) between Ice 3.4 and Ice 3.7, so it seems to me you should:
Ice 3.7 uses the term "Value" to mean instance of Slice class passed by value through a Slice operation. In 3.4, it was called "Object". The class Then, with encoding 1.1, make sure you use the "sliced format" when encoding your Slice class instances (you did not show how you're encoding these instances). The default class format in Ice 3.7 is the "compact format". See https://doc.zeroc.com/ice/3.7/client-server-features/slicing-values-and-exceptions#id-.SlicingValuesandExceptionsv3.7-SliceFormats Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi,
I need to store opaque Ice objects as, say, cache between sessions possibly serialized or to relay. I use Ice 3.7.8.. It seems to work for encoding v 1.1 similar to UnknownSlicedValue and with help of ValueFactory for objects of any type - "":
I unsuccessfully tried to make the above work for legacy encoding v 1.0. What is the right way to do it?
Thanks a lot,
Sergei Kosenko
Beta Was this translation helpful? Give feedback.
All reactions