001/* 002 * Copyright 2002-2012 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.jdbc.datasource.lookup; 018 019import org.springframework.dao.NonTransientDataAccessException; 020 021/** 022 * Exception to be thrown by a DataSourceLookup implementation, 023 * indicating that the specified DataSource could not be obtained. 024 * 025 * @author Juergen Hoeller 026 * @since 2.0 027 */ 028@SuppressWarnings("serial") 029public class DataSourceLookupFailureException extends NonTransientDataAccessException { 030 031 /** 032 * Constructor for DataSourceLookupFailureException. 033 * @param msg the detail message 034 */ 035 public DataSourceLookupFailureException(String msg) { 036 super(msg); 037 } 038 039 /** 040 * Constructor for DataSourceLookupFailureException. 041 * @param msg the detail message 042 * @param cause the root cause (usually from using a underlying 043 * lookup API such as JNDI) 044 */ 045 public DataSourceLookupFailureException(String msg, Throwable cause) { 046 super(msg, cause); 047 } 048 049}