/** * Creates a connection to a Mondrian OLAP Engine. * * @param properties Collection of properties which define the location * of the connection. * See {@link mondrian.rolap.RolapConnection} for a list of allowed properties. * @param locator Use to locate real catalog url by a customized * configuration value. If <code>null</code>, leave the catalog url * unchanged. * @return A {@link Connection}, never null */ public static Connection getConnection( Util.PropertyList properties, CatalogLocator locator) { return getConnection(properties, locator, null); }
Test(String[] args) { pw = new PrintWriter(System.out, true); String connectString = "Data Source=LOCALHOST;Provider=msolap;Catalog=Foodmart"; connection = (RolapConnection) DriverManager.getConnection(connectString, null); }
connection = DriverManager.getConnection( propList, null, dataSource ); } else { connection = DriverManager.getConnection( connectString, null );
/** * Gets a Mondrian connection, creating a new one if fresh is true. * * @return mondrian Connection. */ public synchronized Connection getConnection(boolean fresh) { // FIXME: fresh is currently ignored. if (this.connectString == null) { makeConnectString(); } if (this.connection == null) { this.connection = DriverManager.getConnection(this.connectString, null); } return this.connection; }
/** * create a new connection to Mondrian */ public void valueBound(HttpSessionBindingEvent ev) { String connectString = servletContext.getInitParameter("connectString"); LOGGER.debug("connectString: " + connectString); this.connection = DriverManager.getConnection( connectString, new ServletContextCatalogLocator(servletContext)); if (this.connection == null) { throw new RuntimeException( "No ROLAP connection from connectString: " + connectString); } }
/** * Creates a connection to a Mondrian OLAP Engine * using a connect string * and a catalog locator. * * @param connectString Connect string of the form * 'property=value;property=value;...'. * See {@link mondrian.olap.Util#parseConnectString} for more details of the format. * See {@link mondrian.rolap.RolapConnectionProperties} for a list of * allowed properties. * @param locator Use to locate real catalog url by a customized * configuration value. If <code>null</code>, leave the catalog url * unchanged. * @return A {@link Connection}, never null */ public static Connection getConnection( String connectString, CatalogLocator locator) { Util.PropertyList properties = Util.parseConnectString(connectString); return getConnection(properties, locator); }
private RolapSchema getRolapSchema() { RolapConnection rolapConnection = null; try { rolapConnection = (RolapConnection) DriverManager.getConnection( connectString, this.locator); return rolapConnection.getSchema(); } finally { if (rolapConnection != null) { rolapConnection.close(); } } } }
DriverManager.getConnection(list, null); } catch (Exception ex) { LOGGER.error(
.getConnection(list, null);
mdxConnection = DriverManager.getConnection(connectString, locator); Query q = mdxConnection.parseQuery(queryString); Result result = mdxConnection.execute(q);
list.put("JdbcPassword", jdbcPassword); Connection con = DriverManager.getConnection(list, null);