Mondrian XML/A 配置

10 篇文章 0 订阅

简介

Mondrian是一个开放源代码的Rolap服务器,使用java开发的。它实现了xmla和jolap规范,而且自定义了一种使用mdx语言的客户端接口。

 

环境准备

1、JDK5及以上版本。

2、Tomcat6,其它版本没测过

3、Mondrian,当前最新版本为3.5.0,下载地址:http://mondrian.pentaho.com/

 

安装

1、安装JDK,配置JAVA_HOME环境变量

2、安装Tomcat

3、解压mondrian-3.5.0.zip,复制lib\mondrian.war到Tomcat的webapps目录下,启动Tomcat

4、进入/webapps/mondrian/WEB-INF目录,修改web.xml,注释掉DataSourcesConfig

<servlet>
    <servlet-name>MondrianXmlaServlet</servlet-name>
    <servlet-class>mondrian.xmla.impl.DynamicDatasourceXmlaServlet</servlet-class>
    <!-- 
      This is an example of how to add a callback to the XML/A servlet.
      It must implement mondrian.xmla.XmlaRequestCallback.
    <init-param>
      <param-name>Callbacks</param-name>
      <param-value>com.example.MyCallbackClass;com.example.SomeOtherCallback</param-value>
    </init-param>
    <init-param>
      <param-name>DataSourcesConfig</param-name>
      <param-value>/WEB-INF/datasources.xml</param-value>
    </init-param>
    -->
</servlet>

 

 5、修改datasources.xml

<?xml version="1.0"?>
<!--
  == This software is subject to the terms of the Eclipse Public License v1.0
  == Agreement, available at the following URL:
  == http://www.eclipse.org/legal/epl-v10.html.
  == You must accept the terms of that agreement to use this software.
  ==
  == Copyright (C) 2005-2006 Pentaho and others
  == All Rights Reserved.
  -->
<DataSources>
    <!-- 
         A data source is a collection of logically related Mondrian
         catalogs.

         The XMLA specification allows an XMLA provider to have
         multiple data sources, but some clients, particularly ones
         based on ADOMD.NET such as Simba's O2X client and Pentaho
         Spreadsheet Services, can only connect to the first declared
         data source. Therefore, we recommend that you use a single
         data source, containing multiple catalogs if necessary.
     -->
    <DataSource>
        <!--
             Name of the data source.
        -->
        <DataSourceName>Provider=Mondrian;DataSource=MyDW;</DataSourceName>

        <!--
             Description of the data source.
        -->
        <DataSourceDescription>Mondrian My Data Warehouse</DataSourceDescription>

        <!-- 
             The URL of the servlet.
        -->
        <URL>http://localhost:8080/mondrian/xmla</URL>

        <!--
             Mondrian connect string for the data source. If this data
             source contains multiple catalogs, omit the 'Catalog'
             property, and specify the URI of the schema.xml file in
             the catalog's <Definition> element.

             Catalogs can override the connect string with their own
             <DataSourceInfo> element.
          -->
        <DataSourceInfo>Provider=mondrian;Jdbc=jdbc:mysql://localhost:5029/mydw;JdbcUser=usr;JdbcPassword=pwd;JdbcDrivers=org.gjt.mm.mysql.Driver</DataSourceInfo>

        <!-- 
             Provider name must be 'Mondrian'.
        -->
        <ProviderName>Mondrian</ProviderName>

        <!-- 
             Provider type must be 'MDP'.
        -->
        <ProviderType>MDP</ProviderType>

        <!-- 
             Authentication mode. Allowable values are
             'Unauthenticated', 'Authenticated', 'Integrated'. 
        -->
        <AuthenticationMode>Unauthenticated</AuthenticationMode>

        <!-- 
             A data source contains one or more catalogs.
        -->
        <Catalogs>
            <!-- 
                Catalog names must match the name inside the
                schema.xml file, and must be unique across all data
                sources defined in this datasources.xml file.
            -->
            <Catalog name="mycube">
                <!--
                     Mondrian connect string for the data source. This
                     element is optional; if specified, it overrides the
                     data source's <DataSourceInfo> element. Typically,
                     you would use this element if the catalogs have
                     different JDBC data sources.
                 -->
                <!--
                <DataSourceInfo>Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver</DataSourceInfo>
                 -->

                <!-- 
                    URI of the schema definition file.
                -->
                <Definition>/WEB-INF/queries/testcube.xml</Definition>
            </Catalog>
        </Catalogs>

    </DataSource>

</DataSources>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值