001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2009-2009 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.spi; 011 012import javax.sql.DataSource; 013 014/** 015 * Plugin class that resolves data source name to {@link javax.sql.DataSource} 016 * object. 017 * 018 * <p>The property 019 * {@link mondrian.olap.MondrianProperties#DataSourceResolverClass} determines 020 * which class to use. The default implementation is 021 * {@link mondrian.spi.impl.JndiDataSourceResolver}. 022 * 023 * @author jhyde 024 */ 025public interface DataSourceResolver { 026 027 /** 028 * Converts a data source name to a JDBC data source object. 029 * 030 * @param dataSourceName Data source name 031 * @return JDBC data source, or null if not found 032 * @throws Exception on error 033 */ 034 DataSource lookup(String dataSourceName) throws Exception; 035 036} 037 038// End DataSourceResolver.java