Archived
Custom datatypes for slice-interface-definitions
Hi,
I'm using Hibernate at my Java Backend and would like to use the hibernate-generated java-classes for transfer with ice.
Currently, I've defined a struct and then a sequence of this struct in my slice-interface and I'm using it e.g. as return param.
Consequently, I have to map the hibernate-orm-java objects into the ice-generated datatype.
So my question is can i use the already defined java classes as data-type in a slice-definition.?
Regards
Klaus
Comments
-
Hi Klaus,
If hibernate-orm-java objects implement the
java.io.Serializable
interface, you should be able to use them directly using the"java:serializable"
metadata.See https://doc.zeroc.com/display/Ice37/Serializable+Objects+in+Java for more information.
Keep in mind however that this defeats one of the purpose of Ice: interoperability between different programming languages. You will no longer be able to call on or receive invocations of an Ice program written in another programming language since it won't be able to deserialize it.
Cheers,
0 -
Hi Benoit,
I didn't think about the interoperability - that's a good point. I'll probably keep it like it is.
Thanks anyway!
Regards Klaus
0