Package mondrian.olap

Examples of mondrian.olap.MondrianServer


              DriverManager.getConnection(
                  mc.getDataSourceInfo() + ";Catalog=" + mc.getDefinition(),
                  makeCatalogLocator( servletConfig ) );

          try {
            final MondrianServer server = MondrianServer.forConnection( con );

            FileRepository fr =
                new FileRepository(
                    makeContentFinder( makeDataSourcesUrl( servletConfig ) ),
                    makeCatalogLocator( servletConfig ) );
View Full Code Here


  @GET
  @Produces({ "application/json" })
  @Path("/mondrian")
  public MondrianStats getMondrianStats() {

    MondrianServer mondrianServer = MondrianServer.forId(null);
    if (mondrianServer != null) {
      MondrianVersion mv = mondrianServer.getVersion();

      final Monitor monitor = mondrianServer.getMonitor();
      final ServerInfo server = monitor.getServer();

      int statementCurrentlyOpenCount = 0; //server.statementCurrentlyOpenCount();
      int connectionCurrentlyOpenCount = 0; // server.connectionCurrentlyOpenCount();
      int sqlStatementCurrentlyOpenCount = 0; //server.sqlStatementCurrentlyOpenCount();
View Full Code Here

  @GET
  @Produces({ "application/json" })
  @Path("/mondrian/server")
  public ServerInfo getMondrianServer() {
    MondrianServer mondrianServer = MondrianServer.forId(null);
    if (mondrianServer != null) {
      MondrianVersion mv = mondrianServer.getVersion();

      final Monitor monitor = mondrianServer.getMonitor();
      final ServerInfo server = monitor.getServer();
      return server;
    }
    return null;
  }
View Full Code Here

    /**
     * Tests an embedded server.
     */
    public void testEmbedded() {
        TestContext testContext = TestContext.instance();
        final MondrianServer server =
            MondrianServer.forConnection(testContext.getConnection());
        final int id = server.getId();
        assertNotNull(id);
        server.shutdown();
    }
View Full Code Here

    /**
     * Tests a server with its own repository.
     */
    public void testStringRepository() throws MalformedURLException {
        final MondrianServer server =
            MondrianServer.createWithRepository(
                new StringRepositoryContentFinder("foo bar"),
                null);
        final int id = server.getId();
        assertNotNull(id);
        server.shutdown();
    }
View Full Code Here

    /**
     * Tests a server that reads its repository from a file URL.
     */
    public void testRepository() throws MalformedURLException, SQLException {
        final XmlaTestContext xmlaTestContext = new XmlaTestContext();
        final MondrianServer server =
            MondrianServer.createWithRepository(
                new UrlRepositoryContentFinder(
                    "inline:" + xmlaTestContext.getDataSourcesString()),
                null);
        final int id = server.getId();
        assertNotNull(id);
        OlapConnection connection =
            server.getConnection("FoodMart", "FoodMart", null);
        final NamedList<Catalog> catalogs =
            connection.getOlapCatalogs();
        assertEquals(1, catalogs.size());
        assertEquals("FoodMart", catalogs.get(0).getName());
        server.shutdown();
    }
View Full Code Here

            cellSet,
            new PrintWriter(stringWriter));
        statement1.close();
        println(stringWriter);

        final MondrianServer mondrianServer =
            MondrianServer.forConnection(getConnection());
        final Monitor monitor = mondrianServer.getMonitor();
        final ServerInfo server = monitor.getServer();

        println(
            "# stmts open: "
            + server.getStatementCurrentlyOpenCount());
View Full Code Here

TOP

Related Classes of mondrian.olap.MondrianServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.