01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 5382 2004-09-07 08:15:22Z danesa $
26: * --------------------------------------------------------------------------
27: */package org.objectweb.jonas.dbm;
28:
29: import java.util.List;
30: import java.util.Properties;
31:
32: import org.objectweb.jonas.service.ServiceException;
33:
34: /**
35: * MBean Interface for DataBase Service Management
36: * MBean type: Standard
37: * MBean model: Inheritance (DataBaseServiceImpl)
38: *
39: * @author Michel Bruno and Guillaume Riviere
40: *
41: * Contributor(s):
42: *
43: * 03/01/14 Adriana Danes
44: * Change loadDataSource() signature : take additional argument, the datasource name
45: * Additionnal MBean method : getDatasourceName()
46: */
47: public interface DataBaseServiceImplMBean {
48: /**
49: * @return the list of properties files describing datasources found in JONAS_BASE/conf
50: */
51: public List getDataSourcePropertiesFiles() throws Exception;
52:
53: /**
54: * @return Integer Total Number of Datasource available in JOnAS
55: */
56: public Integer getCurrentNumberOfDataSource();
57:
58: /**
59: * @return Integer Total Number of JDBC connection open
60: */
61: public Integer getTotalCurrentNumberOfJDBCConnectionOpen();
62:
63: /**
64: * @return datasource properties from a local file
65: */
66: public Properties getDataSourcePropertiesFile(String dsFile)
67: throws Exception;
68:
69: /**
70: * Load new datasource
71: * @param name datasource name
72: * @param prop datasource properties
73: * @param loadFromFile true if the datasource is loaded from a .properties file
74: */
75: public void loadDataSource(String name, Properties prop,
76: Boolean 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 dsName);
83:
84: /**
85: * unload existing datasource
86: */
87: public void unloadDataSource(String dsName);
88:
89: /**
90: * @param jndiName The jndi name of a datasource
91: * @return The datasource name
92: */
93: public String getDatasourceName(String jndiName);
94: }
|