<div dir="ltr">Actually, it is called olap4j-xmlaserver. It can be found here:<div><br></div><div><a href="https://github.com/olap4j/olap4j-xmlaserver">https://github.com/olap4j/olap4j-xmlaserver</a><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jul 11, 2013 at 3:36 PM, Luc Boudreau <span dir="ltr"><<a href="mailto:lucboudreau@gmail.com" target="_blank">lucboudreau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Not sure where in that chain the problem is, but I can recommend some best practices which might help.<div><br></div><div>You can override the servlet code and get a handle on the mondrian instance which creates the connections for the servlet. Use that access point to share somehow the MondrianServer instance to your RPC service. Or you can also use the connection parameter called Instance, where you pass the unique ID of a MondrianServer instance. I would do it the first way, because it will be statically typed and will fail hard if it has to.</div>
<div><br></div><div>The olap4j-xmlaservlet is a spinoff of the same code. It allows you to pass any olap4j connection to a generic servlet and turn it into an XMLA service.</div><div><br></div><div>
Hope this helps.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 11, 2013 at 3:39 AM, Martijn van den Broek <span dir="ltr"><<a href="mailto:martijn@basesoft.com" target="_blank">martijn@basesoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>I sure dont hope we're dealing with
giant-zombie-ghosts here. I almost lost a leg last time I
encountered those. <br>
<br>
Our setup is as following: A typical tomcat setup where the
mondrian.jar (git master) lives in the WEB-INF/lib together with
its dependencies. In web.xml the xmla servlet is defined using the
class from the mondrian.jar package:
mondrian.xmla.impl.DynamicDatasourceXmlaServlet . So no
subclassing there. I have also commented callbacks.<br>
I havent yet looked into olap4j-xmlaservet. Is this preferred or
required for the <a>JdbcConnectionUuid?</a>
Will that still work with datasources.xml and reloading and such?<br>
<br>
And then there is the XmlRpcServlet with the clearCache()
functions. It gets the mondrian connection like how I described in
my first post:<br>
mondrian.olap.Connection conn =
mondrian.olap.DriverManager.getConnection(datasource_info, null);<br>
<br>
I sense some deprecation here. Should I be using the olap4j api to
get the connection? And then unwrap it to a
mondrian.olap.Connection to access the caching methods? <br><div><div>
<br>
<br>
<br>
<br>
On 10/07/13 17:17, Luc Boudreau wrote:<br>
</div></div></div><div><div>
<blockquote type="cite">
<div dir="ltr">If the cache is empty but you get MDX results back,
then yes, something is wrong. Could be ghosts, or worse,
giant-zombie-ghosts; Half giant, half zombie, half ghost.
<div><br>
</div>
<div>Can you give more details on how things are setup?
I'm not certain I understand exactly how you've setup things.
How are you creating the Mondrian instance? Are you using the
olap4j-xmlaservet project? Have you subclasses the servlet
with your own code?</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Jul 10, 2013 at 11:10 AM,
Martijn van den Broek <span dir="ltr"><<a href="mailto:martijn@basesoft.com" target="_blank">martijn@basesoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Thanks for your quick reply. I forgot to mention I
also have tried the JdbcConnectionUuid. Ive tried again:<br>
<br>
If I understand correctly, for XMLA no changes are
needed except a modification in datasources.xml which
now looks like:<br>
<br>
<DataSourceInfo>Provider=mondrian;JdbcDrivers=com.mysql.jdbc.Driver;Jdbc=jdbc:mysql://<a href="http://127.0.0.1:3306/iqportal?user=xxx&password=xxx;Catalog=" target="_blank">127.0.0.1:3306/iqportal?user=xxx&amp;password=xxx;Catalog=</a><a>file:///home/martijn/workspace_ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/iqube/WEB-INF/queries/basesoft.settings.martijn.IQuest.xml;UseContentChecksum=true;JdbcConnectionUuid=basesoft.settings.martijn.IQuest</a></DataSourceInfo><br>
<br>
The datasource_info that the XMLRPC servlet uses is now:
<br>
<br>
Provider=mondrian;JdbcDrivers=com.mysql.jdbc.Driver;Jdbc=jdbc:mysql://<a href="http://127.0.0.1:3306/iqportal?user=root&password=f00b4r;Catalog=" target="_blank">127.0.0.1:3306/iqportal?user=root&password=f00b4r;Catalog=</a><a>file:///home/martijn/workspace_ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/iqube/WEB-INF/queries/basesoft.settings.martijn.IQuest.xml;UseContentChecksum=true;JdbcConnectionUuid=basesoft.settings.martijn.IQuest</a><br>
<br>
However XMLRPC servlet cache still seems to be empty.
Also re-executing the MDX query does no SQL queries
against the database. Could anything else be wrong here?
<div>
<div><br>
<br>
<br>
<br>
<br>
On 10/07/13 15:37, Luc Boudreau wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">You might not be hitting the same
schema in cache. Using the datasource + checksum
is tricky. If a single character changes in the
schema, the checksum changes and you can't get a
cache hit anymore, thus fragmenting your cache by
creating a bunch of different schemas.
<div> <br>
</div>
<div>One thing you might look into, the
JdbcConnectionUuid connection property. If
defined, it forces Mondrian to use a given
schema from the pool. Be wary though, make sure
that you don't assign the same UUID to two
different schemas, or you'll get weird things
happening.</div>
<div><br>
</div>
<div>Luc</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Jul 10, 2013 at
5:08 AM, Martijn van den Broek <span dir="ltr"><<a href="mailto:martijn@basesoft.com" target="_blank">martijn@basesoft.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello fellow
mondrians,<br>
<br>
We are running Mondrian using XMLA (compiled
current git master) in a<br>
Tomcat 6 instance defined as following in
web.xml:<br>
<br>
<servlet><br>
<servlet-name>MondrianXmlaServlet</servlet-name><br>
<br>
<servlet-class>mondrian.xmla.impl.DynamicDatasourceXmlaServlet</servlet-class><br>
...<br>
</servlet><br>
<br>
Next to that in the same web.xml, we have our
own XMLRPC servlet for<br>
controlling various mondrian tasks like
writing schema files and<br>
controlling cache:<br>
<br>
<servlet><br>
<servlet-name>IQubeXmlRpcServlet</servlet-name><br>
<servlet-class>com.basesoft.iqube.xml.IQubeXmlRpcServlet</servlet-class><br>
...<br>
</servlet><br>
<br>
In that second xmlrpc servlet a clearCache
method is defined which<br>
accepts a mondrian connectionstring similar as
the code below:<br>
<br>
String datasource_info =<br>
"Provider=mondrian;JdbcDrivers=com.mysql.jdbc.Driver;Jdbc=jdbc:mysql://<a href="http://127.0.0.1:3306/iqportal?user=xxx&password=xxx;Catalog=file:///home/martijn/workspace_ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/iqube/WEB-INF/queries/basesoft.settings.martijn.IQuest.xml;UseContentChecksum=true" target="_blank">127.0.0.1:3306/iqportal?user=xxx&password=xxx;Catalog=file:///home/martijn/workspace_ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/iqube/WEB-INF/queries/basesoft.settings.martijn.IQuest.xml;UseContentChecksum=true</a>;";<br>
<br>
Connection conn =
DriverManager.getConnection(datasource_info,<br>
null);<br>
PrintWriter pw = new
PrintWriter(System.out, true);<br>
CacheControl cacheControl =
conn.getCacheControl(pw);<br>
<br>
for (Cube cube :
conn.getSchema().getCubes()) {<br>
<br>
CacheControl.CellRegion region =<br>
cacheControl.createMeasuresRegion(cube);<br>
<br>
System.out.println("!!
clearMemberCache: cache state before:");<br>
cacheControl.printCacheState(pw,
region);<br>
<br>
cacheControl.flush(region);<br>
<br>
System.out.println("!!
clearMemberCache: cache state after:");<br>
cacheControl.printCacheState(pw,
region);<br>
<br>
System.out.println("Cleared cache
for cube '" +<br>
cube.getName() + "'");<br>
}<br>
<br>
Now if an MDX query is executed against the
XMLA server and then the<br>
clearCache() method on the XMLRPC servlet is
called, the cache state is<br>
printed as empty. It is not possible to clear
the mondrian cache this<br>
way anymore. This code used to work in
mondrian 3.5 but it seems the API<br>
has changed. My guess is that I am requesting
the mondrian connection<br>
wrong due to the recent olap4j changes.<br>
<br>
Any hints on how to get a proper connection?
Any help is appreciated.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Kind regards,<br>
<br>
Martijn van den Broek<br>
BaseSoft Solutions B.V.<br>
<br>
Herengracht 564<br>
1017 CH Amsterdam<br>
The Netherlands<br>
<br>
<a href="http://www.basesoftsolutions.com/" target="_blank">http://www.basesoftsolutions.com/</a><br>
+31(0)206847087<br>
<br>
Confidentiality notice<br>
**********************************************************************<br>
This email and any files transmitted with it
are confidential and<br>
intended solely for the use of the individual
or entity to whom they<br>
are addressed. If you have received this email
in error please notify<br>
the system manager.<br>
**********************************************************************<br>
<br>
<br>
<br>
_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Mondrian mailing list
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Kind regards,
Martijn van den Broek
BaseSoft Solutions B.V.
Herengracht 564
1017 CH Amsterdam
The Netherlands
<a href="http://www.basesoftsolutions.com/" target="_blank">http://www.basesoftsolutions.com/</a>
+31(0)206847087
Confidentiality notice
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
</pre>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Mondrian mailing list
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Kind regards,
Martijn van den Broek
BaseSoft Solutions B.V.
Herengracht 564
1017 CH Amsterdam
The Netherlands
<a href="http://www.basesoftsolutions.com/" target="_blank">http://www.basesoftsolutions.com/</a>
+31(0)206847087
Confidentiality notice
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
</pre>
</div></div></div>
<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>