Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: result serialization

  1. #1
    Join Date
    Dec 2002

    Default result serialization

    is Result serializable?
    I'd like to send a Result through an ObjectOutputStream to be treated by a distant application(applet).
    Interface serializable is not implemented in RolapResult but can we overide it ?

  2. #2
    Join Date
    Nov 1999

    Default RE: result serialization

    You're welcome to make that change.
    Another option to consider (preferable, I think) is serializing to XML; see src/main/mondrian/web/taglib/ This produces XML, which we feed through XSL transforms to produce the various tables you see in taglib.jsp.

  3. #3
    Join Date
    Nov 1999

    Default RE: result serialization

    Comments from Andreas Voss [avix]:
    I don't think it's a good idea to use java serialization on the mondrian core classes (Result). The problem is, that java serialization serializes *everything* - so it will serialize the query, the built-in function table, the JDBC driver and everything else it can reach. You will have to bear this in mind when you change the system in the future, e.g. you will not be able to add a reference from the Result to the JDBC driver because the serialization may fail. Using the transient keyword here would be more like a hack, because the de-serialized Result will not be functional, so the Result pretends to be serializable but it is not.
    Java serialization is ok, but I'd copy the result into a separate class hierarchy before serializing. After that, one could use XMLEncoder (java 1.4) too, its similar to but operates on java beans and uses XML as data format.
    I would not use the DOMBuilder, because the XML can not easily converted back to java objects. Also I'd consider the web package(s) as deprecated, they will be replaced by JPivot soon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.