<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>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.</div><div><br></div><div>Something along the following lines can be found in MDXConnection, PentahoXmlaServlet, or Reporting code:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;DataSource dataSourceImpl = datasourceService.getDataSource(dataSourceName); &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a30065">if</span> (dataSourceImpl != <span style="color: #a30065">null</span>) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; properties.remove(<span style="text-decoration: underline">RolapConnectionProperties</span>.DataSource.name());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="text-decoration: underline ; color: #3200cf">nativeConnection</span> = <span style="text-decoration: underline">DriverManager</span>.getConnection(properties, <span style="color: #a30065">null</span>, dataSourceImpl);</div></div><div><br></div><div>This code leads to a different connectionKey (cache key) that I can create with MondrianOlap4jConnection.</div><div>We basically use the 100% same connection string (catalog url, everything), but still end up with a different key.</div><div><br></div><div>Is there ANY way that we can turn a RolapConnection into an OlapConnection (MondrianOlap4jConnection if possible) ?</div><div>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.</div><div><br></div><div>Could someone shed some light on this and maybe help us come up with a way how we can achieve this shared cache?</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>Thanks,</div><div>Paul</div><div><br></div></body></html>