    <!--
        Provide these jars in JBoss AS profile's "lib" directory, to place the mondrian JDBC driver
        on classpath.
        
        commons-math-1.0.jar
        commons-vfs-1.0.jar
        eigenbase-properties.jar
        eigenbase-resgen.jar
        eigenbase-xom.jar
        javacup.jar
        mondrian.jar
        olap4j.jar
        
        Only use this datasource, if your mondrian server is also deployed to same JBoss AS
        server, this will make embedded connection to mondrian. If you are working remote 
        then use olap-xmla-ds.xml file  
    -->




<!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
    <datasources>
        <datasource jndi-name="java:/mondrianDS" pool-name="mondrianDS">
            <connection-url>jdbc:mondrian:Provider=Mondrian;DataSource=java:foodmart;Catalog=FoodMart;Catalog=${jboss.server.home.dir}/deploy/mondrian.war/WEB-INF/queries/FoodMart.xml;</connection-url>
            <driver>olap</driver>
            <driver-class>mondrian.olap4j.MondrianOlap4jDriver</driver-class>
            <pool>
                <prefill>false</prefill>
                <use-strict-min>false</use-strict-min>
                <flush-strategy>FailingConnectionOnly</flush-strategy>
            </pool>
            <security>
                <user-name>{user}</user-name>
                <password>{password}</password>
            </security>
        </datasource>                               
        <drivers>
            <driver name="olap" module="org.olap4j"/>
        </drivers>
    </datasources>
</subsystem