[Mondrian] olap4j connectivity

Julian Hyde jhyde at pentaho.com
Mon Jun 11 12:25:54 EDT 2012


A conversation that started on IRC, was moved to http://jira.pentaho.com/browse/ANALYZER-726.

Marc Batchelor<http://jira.pentaho.com/secure/ViewProfile.jspa?name=mbatchelor> added a comment - 11/Jun/12 9:40 AM
Based on discussions on the IRC with Paul, I might have come up with a solution to the shared-cache thing:

The key to making Saiku (and others using OLAP4j) share the same connection cache with the others is that the two RolapSchema.makeKey methods should return the same value for the cache key. However, that's not presently the case because one implementation uses the catalogUrl, connectionKey, jdbcUser and dataSourceStr to generate the key, the other just receives the catalogUrl and the datasource object. My suggestion is that we allow those two methods to be provided by a class that implements a new SPI. The default implementation will do precisely what it's currently doing. However, those needing a new implementation could do something different. For example, a new implementation could take the datasourceStr, look up the datasource the way the platform does, and then call the other makeKey - that would make sure that they were both doing the same thing. Or, in simpler environments, the catalogUrl could contain the cache key and there would be no computation at all. The latter wouldn't work in MT environments, but it would work in simple places where there's only one instance of the datasource object for any given JNDI lookup of the datasource name.

<http://jira.pentaho.com/browse/ANALYZER-726#>
<http://jira.pentaho.com/browse/ANALYZER-726?focusedCommentId=119884&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-119884> <http://jira.pentaho.com/secure/EditComment!default.jspa?id=87250&commentId=119884>  <http://jira.pentaho.com/secure/DeleteComment!default.jspa?id=87250&commentId=119884>
Julian Hyde<http://jira.pentaho.com/secure/ViewProfile.jspa?name=jhyde> added a comment - 11/Jun/12 11:19 AM
It's already too complicated. Adding another SPI that even I barely understand won't solve it. The solution is to simplify, and make mondrian's olap4j driver behave more like a black box.

In short, people should always pass in data source strings, not javax.sql.DataSource objects. As long as everyone passes in the same connect string (or Properties object containing (key, value) string pairs) then everyone should receive the same cached connection object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120611/16a3de3d/attachment.html 


More information about the Mondrian mailing list