[Mondrian] mondrian: XMLAException and Olap4j
jhyde at pentaho.com
Mon Jul 30 18:29:28 EDT 2012
On Jul 26, 2012, at 12:52 AM, Michele Rossi <michele.rossi at gmail.com> wrote:
> Mondrian's DefaultXmlaServlet treats exceptions mondrian.xmla.XmlaException in a special way using information present in that exception to return an XMLA complaint error message.
> We are using mondrian's XMLA support with our own Olap4j driver and the problem is that the only way we have to generate meaningful Xmla error responses is to throw "XmlaException" from our Olap4j driver.
> This is not ideal as it forces us to depend on the whole mondrian package just for that XMLAException class.
I think XmlaException only depends upon the rest of Mondrian (the non-XMLA server parts) because it extends mondrian.olap.MondrianException. What happens if you make it instead extend RuntimeException?
> As XMLA and Olap4j are intimately related I suggest that we extend the Olap4jException class with info such as the faultCode, code, faultString.
> We could then modify mondrian.xmla.impl.DefaultXmlaServlet to handle Olap4jException as well the XmlaException as it does currently.
I'm not a big fan of specially-typed exceptions, and have no particular love for XmlaException, but OlapException doesn't seem to be the right fit here either.
> I also suggest bringing class XmlaConstants in the Olap4j package, perhaps in its Xmla support sub-package.
Yes, this is the plan. All mondrian.xmla.* code (including XmlaException, XmlaConstants and XmlaHandler.XmlaExtra) will become a standalone project, called something like olap4j-xmlaserver. It will depend on olap4j (but not any particular olap4j driver, nor on Mondrian). Constants which come from the XMLA and OLE DB for OLAP will be moved into olap4j (although this may take longer, due to olap4j's slower release schedule).
> I understand that this is not the Olap4j development list but I am hoping to find several Olap4j contributors here too.
> If so could you kindly forward this message on to the relevant list too?
I think this list will suffice. It will be in the archive.
More information about the Mondrian