KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > dbm > DataBaseServiceImplMBean


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): ____________________________________.
22  * Contributor(s): Michel Bruno and Guillaume Riviere
23  *
24  * --------------------------------------------------------------------------
25  * $Id: DataBaseServiceImplMBean.java,v 1.8 2004/09/07 08:15:22 danesa Exp $
26  * --------------------------------------------------------------------------
27  */

28
29 package org.objectweb.jonas.dbm;
30
31 import java.util.List JavaDoc;
32 import java.util.Properties JavaDoc;
33
34 import org.objectweb.jonas.service.ServiceException;
35
36 /**
37  * MBean Interface for DataBase Service Management
38  * MBean type: Standard
39  * MBean model: Inheritance (DataBaseServiceImpl)
40  *
41  * @author Michel Bruno and Guillaume Riviere
42  *
43  * Contributor(s):
44  *
45  * 03/01/14 Adriana Danes
46  * Change loadDataSource() signature : take additional argument, the datasource name
47  * Additionnal MBean method : getDatasourceName()
48  */

49 public interface DataBaseServiceImplMBean {
50    /**
51      * @return the list of properties files describing datasources found in JONAS_BASE/conf
52      */

53     public List JavaDoc getDataSourcePropertiesFiles() throws Exception JavaDoc;
54
55     /**
56      * @return Integer Total Number of Datasource available in JOnAS
57      */

58     public Integer JavaDoc getCurrentNumberOfDataSource();
59
60     /**
61      * @return Integer Total Number of JDBC connection open
62      */

63     public Integer JavaDoc getTotalCurrentNumberOfJDBCConnectionOpen();
64
65     /**
66      * @return datasource properties from a local file
67      */

68     public Properties JavaDoc getDataSourcePropertiesFile(String JavaDoc dsFile) throws Exception JavaDoc ;
69
70     /**
71      * Load new datasource
72      * @param name datasource name
73      * @param prop datasource properties
74      * @param loadFromFile true if the datasource is loaded from a .properties file
75      */

76     public void loadDataSource(String JavaDoc name, Properties JavaDoc prop, Boolean JavaDoc loadFromFile) throws ServiceException ;
77
78     /**
79      * Determine if a datasource with a given name is already loaded in the dbm service
80      * @param dsName the name of the datasource to be checked if loaded
81      */

82     public boolean isLoadedDataSource(String JavaDoc dsName);
83
84     /**
85      * unload existing datasource
86      */

87     public void unloadDataSource(String JavaDoc dsName);
88
89     /**
90      * @param jndiName The jndi name of a datasource
91      * @return The datasource name
92      */

93     public String JavaDoc getDatasourceName(String JavaDoc jndiName);
94 }
95
Popular Tags