[Mondrian] XMLaServlet

Patrick Leckey patl at seewind.com
Wed Feb 8 15:30:40 EST 2012


Hi Jean,

In 3.3.0 this actually got much easier to accomplish because an extended XMLA servlet to do exactly this is included by default.  We use it in house and it works beautifully.  It is the DynamicDatasourceXmlaServlet, documented here:
http://mondrian.pentaho.com/api/mondrian/xmla/impl/DynamicDatasourceXmlaServlet.html

In your Mondrian WEB-INF/web.xml, simply override the servlet definition for the MondrianXmlaServlet to look like this:
  <servlet>
    <servlet-name>MondrianXmlaServlet</servlet-name>
    <servlet-class>mondrian.xmla.impl.DynamicDatasourceXmlaServlet</servlet-class>
    <init-param>
      <param-name>DataSourcesConfig</param-name>
      <param-value>http://localhost/mars/olap/datasources?provider=mondrian</param-value>
    </init-param>
  </servlet>

The DataSourcesConfig value then points to whatever URL you want to have spit out your datasources XML, which Mondrian loads from there.  In the mondrian.properties file you then set the timeout (in ms) on which Mondrian will re-read that datasources URL:

mondrian.xmla.SchemaRefreshInterval=60000

HTH,
Pat

On 2012-02-08, at 3:06 PM, Jean-Francois Croteau wrote:

> Hi everyone,
> 	I was using Mondrian 3.2.1 to be able to programmatically define a datasource, by extending the DefaultXmlaServlet, and by using the mondrian.xmla.XmlaServlet.addToDataSources(DataSources) function to pass my programmatically defined datasources. I just updated to Mondrian 3.3.0 (because of the issue http://jira.pentaho.com/browse/MONDRIAN-675), and it seems that everything changed in the API.
> 
> Can someone point me what to do to be able to do the same thing? I was looking at DefaultXmlaServlet, and MondrianXmlaServlet, but I can't figure out how to replicate my work without a datasource.xml file, which I cannot do.
> 
> Thank you.
> 
> 
> Jean-Francois Croteau
> jfcroteau at 8D.com
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian

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


More information about the Mondrian mailing list