[Mondrian] Mondrian DataSource

Paul Stoellberger p.stoellberger at gmail.com
Fri Jan 24 08:37:15 EST 2014

You can use the parameter:  … ;DataSource=<your datasource name>;

That will look up the datasource in the InitialContext e.g. set by context.xml in your web application.
You can define the number of connections etc. in that Resource


On Jan 24, 2014, at 1:10 PM, Hilario Fernandes <hilario.fernandes at cortex-intelligence.com> wrote:

> Hi,
> Im using mondrian in my project and i've been trying to find a way to make mondrian use the defined datasource for the SQL queries it performs.
> Currently i'm using the method described in MondrianOlap4jDriver to get a connection:
> Connection connection =DriverManager.getConnection(
>     "jdbc:mondrian:Jdbc=jdbc:odbc:MondrianFoodMart; Catalog=file:/mondrian/demo/FoodMart.xml; JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver");
> OlapConnection olapConnection = connection.unwrap(OlapConnection.class);
> Then executing queries like:
> olapConnection.createStatement()
> statement.executeOlapQuery(query)
> As i understand like this, I have no control over the number of connections done to the underlying database. Is there someway to pass the datasource object to mondrian for it to use when getting connections to perform SQL?
> I've read in the documentation about the parameter "PoolNeeded", but this seems to create a new datasource visible to mondrian which i have no control over. I've found also the param mondrian­.­spi­.­dataSourceResolverClass but i'm not sure how to use it, or if it has anything to do with what i'm trying to do.
> If anyone can point some directions i'd be very grateful.
> thanks
> -- 
> Hilario Fernandes
> _______________________________________________
> 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/20140124/40fe9a08/attachment.html 

More information about the Mondrian mailing list