This forum has been archived. Please start a new discussion on GitHub.

Custom datatypes for slice-interface-definitions


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.?




  • benoit
    benoit Rennes, France

    Hi Klaus,

    If hibernate-orm-java objects implement the interface, you should be able to use them directly using the "java:serializable" metadata.

    See 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.


  • 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