[Mondrian] sharing mondrian cache with biserver

Julian Hyde jhyde at pentaho.com
Wed Jun 6 17:50:17 EDT 2012


As usual, I'll answer in the future tense... this may not help solve your problem, but this is how I'd like things to be.

Pentaho should be getting its Mondrian connections from olap4j. (They're not, but they will be soon, they assure me.) If they (or anyone else) wants an old-style RolapConnection object, they can get it by calling connection.unwrap(RolapConnection.class). But it's perverse to start with a RolapConnection and try to wrap it as a MondrianOlap4jConnection.

Julian

On Jun 6, 2012, at 12:42 PM, Paul Stoellberger wrote:

Hi,

me and Pedro have done some more investigation and it appears like all of the pentaho code uses the mondrian.olap.DriverManager along with a already looked up datasource to create a Mondrian connection.

Something along the following lines can be found in MDXConnection, PentahoXmlaServlet, or Reporting code:

        DataSource dataSourceImpl = datasourceService.getDataSource(dataSourceName);
        if (dataSourceImpl != null) {
          properties.remove(RolapConnectionProperties.DataSource.name());
          nativeConnection = DriverManager.getConnection(properties, null, dataSourceImpl);

This code leads to a different connectionKey (cache key) that I can create with MondrianOlap4jConnection.
We basically use the 100% same connection string (catalog url, everything), but still end up with a different key.

Is there ANY way that we can turn a RolapConnection into an OlapConnection (MondrianOlap4jConnection if possible) ?
I've looked at the MondrianServer code and thought maybe it was possible to create a RolapConnection just like all the pentaho code and then somehow use OlapConnection getConnection(), but I'm not sure whether this is even possible or not.

Could someone shed some light on this and maybe help us come up with a way how we can achieve this shared cache?

I don't quite get why the pentaho code does what it does, since we have the DatasourceService anyway..... if someone with some knowledge could clarify this that would be great as well.


Thanks,
Paul


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120606/bf98e240/attachment.html 


More information about the Mondrian mailing list