<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">A conversation that started on IRC, was moved to&nbsp;<a href="http://jira.pentaho.com/browse/ANALYZER-726">http://jira.pentaho.com/browse/ANALYZER-726</a>.<div><br></div><div><div id="comment-119874" class="issue-data-block activity-comment twixi-block expanded" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); color: rgb(0, 0, 0); font-family: arial, FreeSans, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><div class="twixi-wrap verbose actionContainer" style="margin: 0px; padding: 0px 0px 0px 1.25em; position: relative; "><div class="action-details" style="margin: 0px; padding: 0px; line-height: 1.5; text-align: left; "><a class="user-hover user-avatar" rel="mbatchelor" id="commentauthor_119874_verbose" href="http://jira.pentaho.com/secure/ViewProfile.jspa?name=mbatchelor" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; padding: 2px 0px 2px 19px; background-image: url(http://jira.pentaho.com/secure/useravatar?size=small&amp;avatarId=10142); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">Marc Batchelor</a>&nbsp;added a comment -&nbsp;<span class="subText" style="font-size: 1em; "><span class="date">11/Jun/12 9:40 AM</span></span></div><div class="action-body flooded" style="margin: 0px; padding: 0px; overflow-x: auto; overflow-y: hidden; ">Based on discussions on the IRC with Paul, I might have come up with a solution to the shared-cache thing:&nbsp;<br><br>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.&nbsp;<br></div><div class="action-body flooded" style="margin: 0px; padding: 0px; overflow-x: auto; overflow-y: hidden; "><br></div></div></div><div id="comment-119884" class="issue-data-block activity-comment twixi-block expanded focused" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); background-color: rgb(240, 240, 240); color: rgb(0, 0, 0); font-family: arial, FreeSans, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; position: static; z-index: auto; "><div class="twixi-wrap verbose actionContainer" style="margin: 0px; padding: 0px 0px 0px 1.25em; position: relative; "><a href="http://jira.pentaho.com/browse/ANALYZER-726#" class="twixi" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; display: block; position: absolute; left: 0px; top: 0.25em; width: 1em; height: 1em; "><span class="icon twixi-opened" style="background-image: url(http://jira.pentaho.com/s/620/29/1.0/_/images/icons/sprites/icons_module.png); background-color: transparent; display: inline-block; height: 16px; vertical-align: text-top; width: 16px; overflow: hidden; margin: 0px; padding: 0px; background-position: 0px -799px; background-repeat: no-repeat no-repeat; "></span></a><div class="action-links" style="margin: 0px; padding: 0px; float: right; visibility: visible; "><a href="http://jira.pentaho.com/browse/ANALYZER-726?focusedCommentId=119884&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-119884" title="A permanent link to this comment." class="icon icon-perma" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; background-image: url(http://jira.pentaho.com/s/620/29/1.0/_/images/icons/sprites/icons_module.png); background-color: transparent; display: inline-block; height: 16px; vertical-align: text-top; width: 16px; overflow: hidden; margin: 0px 0.166em; padding: 0px; background-position: 0px -950px; background-repeat: no-repeat no-repeat; "></a>&nbsp;<a id="edit_comment_119884" href="http://jira.pentaho.com/secure/EditComment!default.jspa?id=87250&amp;commentId=119884" title="Edit" class="icon icon-edit-sml" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; background-image: url(http://jira.pentaho.com/s/620/29/1.0/_/images/icons/sprites/icons_module.png); background-color: transparent; display: inline-block; height: 16px; vertical-align: text-top; width: 16px; overflow: hidden; margin: 0px 0.166em; padding: 0px; background-position: 3px -699px; background-repeat: no-repeat no-repeat; "></a>&nbsp;<a id="delete_comment_119884" href="http://jira.pentaho.com/secure/DeleteComment!default.jspa?id=87250&amp;commentId=119884" title="Delete" class="icon icon-delete" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; background-image: url(http://jira.pentaho.com/s/620/29/1.0/_/images/icons/sprites/icons_module.png); background-color: transparent; display: inline-block; height: 16px; vertical-align: text-top; width: 16px; overflow: hidden; margin: 0px 0.166em; padding: 0px; background-position: 0px -150px; background-repeat: no-repeat no-repeat; "></a></div><div class="action-details" style="margin: 0px; padding: 0px; line-height: 1.5; text-align: left; "><a class="user-hover user-avatar" rel="jhyde" id="commentauthor_119884_verbose" href="http://jira.pentaho.com/secure/ViewProfile.jspa?name=jhyde" style="color: rgb(102, 102, 51); cursor: pointer; text-decoration: none; padding: 2px 0px 2px 19px; background-image: url(http://jira.pentaho.com/secure/useravatar?size=small&amp;ownerId=jhyde&amp;avatarId=10420); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">Julian Hyde</a>&nbsp;added a comment -&nbsp;<span class="subText" style="font-size: 1em; "><span class="date">11/Jun/12 11:19 AM</span></span></div><div class="action-body flooded" style="margin: 0px; padding: 0px; overflow-x: auto; overflow-y: hidden; ">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.&nbsp;<br><br>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.&nbsp;</div></div></div></div></body></html>