[Mondrian] Mondrian DataSource

Hilario Fernandes hilario.fernandes at cortex-intelligence.com
Mon Jan 27 06:14:29 EST 2014


Thanks a lot for your reply! I got to to work now! No idea how i missed
that!


On Fri, Jan 24, 2014 at 1:37 PM, Paul Stoellberger <p.stoellberger at gmail.com
> wrote:

> 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
>
>
> -Paul
>
> 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<http://mondrian.pentaho.com/documentation/api/mondrian/olap/MondrianProperties.html#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
>
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


-- 
Hilario Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20140127/0b12ec82/attachment.html 


More information about the Mondrian mailing list