KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > datasource > DataSourceComponent


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.datasource;
9
10 import java.sql.Connection JavaDoc;
11 import java.sql.SQLException JavaDoc;
12 import org.apache.avalon.framework.component.Component;
13 import org.apache.avalon.framework.thread.ThreadSafe;
14 import org.apache.avalon.framework.configuration.Configurable;
15
16 /**
17  * The standard interface for DataSources in Avalon.
18  *
19  * @author <a HREF="mailto:bloritsch@apache.org">Berin Loritsch</a>
20  * @version CVS $Revision: 1.4 $ $Date: 2001/12/11 09:53:28 $
21  * @since 4.0
22  */

23 public interface DataSourceComponent
24     extends Component, Configurable, ThreadSafe
25 {
26     /**
27      * The name of the role for convenience
28      */

29     String JavaDoc ROLE = "org.apache.avalon.excalibur.datasource.DataSourceComponent";
30
31     /**
32      * Gets the Connection to the database
33      *
34      * @throws NoValidConnectionException when there is no valid Connection wrapper
35      * available in the classloader.
36      *
37      * @throws NoAvailableConnectionException when there are no more available
38      * Connections in the pool.
39      */

40     Connection JavaDoc getConnection()
41         throws SQLException JavaDoc;
42 }
43
Popular Tags