001: /*
002: * Distributed as part of c3p0 v.0.9.1.2
003: *
004: * Copyright (C) 2005 Machinery For Change, Inc.
005: *
006: * Author: Steve Waldman <swaldman@mchange.com>
007: *
008: * This library is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU Lesser General Public License version 2.1, as
010: * published by the Free Software Foundation.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public License
018: * along with this software; see the file LICENSE. If not, write to the
019: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: */
022:
023: package com.mchange.v2.c3p0.mbean;
024:
025: import com.mchange.v2.c3p0.*;
026: import java.beans.PropertyVetoException;
027: import java.sql.SQLException;
028: import java.util.Properties;
029: import javax.naming.NamingException;
030:
031: /**
032: * @deprecated Please use com.mchange.v2.c3p0.jboss.C3P0PooledDataSourceMBean
033: */
034: public interface C3P0PooledDataSourceMBean {
035: // Jndi Setup
036: public void setJndiName(String jndiName) throws NamingException;
037:
038: public String getJndiName();
039:
040: // DriverManagerDataSourceProperties
041: public String getDescription();
042:
043: public void setDescription(String description)
044: throws NamingException;
045:
046: public String getDriverClass();
047:
048: public void setDriverClass(String driverClass)
049: throws PropertyVetoException, NamingException;
050:
051: public String getJdbcUrl();
052:
053: public void setJdbcUrl(String jdbcUrl) throws NamingException;
054:
055: // DriverManagerDataSource "virtual properties" based on properties
056: public String getUser();
057:
058: public void setUser(String user) throws NamingException;
059:
060: public String getPassword();
061:
062: public void setPassword(String password) throws NamingException;
063:
064: // WrapperConnectionPoolDataSource properties
065: public int getCheckoutTimeout();
066:
067: public void setCheckoutTimeout(int checkoutTimeout)
068: throws NamingException;
069:
070: public int getAcquireIncrement();
071:
072: public void setAcquireIncrement(int acquireIncrement)
073: throws NamingException;
074:
075: public int getAcquireRetryAttempts();
076:
077: public void setAcquireRetryAttempts(int acquireRetryAttempts)
078: throws NamingException;
079:
080: public int getAcquireRetryDelay();
081:
082: public void setAcquireRetryDelay(int acquireRetryDelay)
083: throws NamingException;
084:
085: public boolean isAutoCommitOnClose();
086:
087: public void setAutoCommitOnClose(boolean autoCommitOnClose)
088: throws NamingException;
089:
090: public String getConnectionTesterClassName();
091:
092: public void setConnectionTesterClassName(
093: String connectionTesterClassName)
094: throws PropertyVetoException, NamingException;
095:
096: public String getAutomaticTestTable();
097:
098: public void setAutomaticTestTable(String automaticTestTable)
099: throws NamingException;
100:
101: public boolean isForceIgnoreUnresolvedTransactions();
102:
103: public void setForceIgnoreUnresolvedTransactions(
104: boolean forceIgnoreUnresolvedTransactions)
105: throws NamingException;
106:
107: public int getIdleConnectionTestPeriod();
108:
109: public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
110: throws NamingException;
111:
112: public int getInitialPoolSize();
113:
114: public void setInitialPoolSize(int initialPoolSize)
115: throws NamingException;
116:
117: public int getMaxIdleTime();
118:
119: public void setMaxIdleTime(int maxIdleTime) throws NamingException;
120:
121: public int getMaxPoolSize();
122:
123: public void setMaxPoolSize(int maxPoolSize) throws NamingException;
124:
125: public int getMaxStatements();
126:
127: public void setMaxStatements(int maxStatements)
128: throws NamingException;
129:
130: public int getMaxStatementsPerConnection();
131:
132: public void setMaxStatementsPerConnection(
133: int maxStatementsPerConnection) throws NamingException;
134:
135: public int getMinPoolSize();
136:
137: public void setMinPoolSize(int minPoolSize) throws NamingException;
138:
139: public int getPropertyCycle();
140:
141: public void setPropertyCycle(int propertyCycle)
142: throws NamingException;
143:
144: public boolean isBreakAfterAcquireFailure();
145:
146: public void setBreakAfterAcquireFailure(
147: boolean breakAfterAcquireFailure) throws NamingException;
148:
149: public boolean isTestConnectionOnCheckout();
150:
151: public void setTestConnectionOnCheckout(
152: boolean testConnectionOnCheckout) throws NamingException;
153:
154: public boolean isTestConnectionOnCheckin();
155:
156: public void setTestConnectionOnCheckin(
157: boolean testConnectionOnCheckin) throws NamingException;
158:
159: public boolean isUsesTraditionalReflectiveProxies();
160:
161: public void setUsesTraditionalReflectiveProxies(
162: boolean usesTraditionalReflectiveProxies)
163: throws NamingException;
164:
165: public String getPreferredTestQuery();
166:
167: public void setPreferredTestQuery(String preferredTestQuery)
168: throws NamingException;
169:
170: // PoolBackedDataSource properties (count: 2)
171: public int getNumHelperThreads();
172:
173: public void setNumHelperThreads(int numHelperThreads)
174: throws NamingException;
175:
176: // shared properties (count: 1)
177: public String getFactoryClassLocation();
178:
179: public void setFactoryClassLocation(String factoryClassLocation)
180: throws NamingException;
181:
182: // PooledDataSource statistics
183:
184: public int getNumUserPools() throws SQLException;
185:
186: public int getNumConnectionsDefaultUser() throws SQLException;
187:
188: public int getNumIdleConnectionsDefaultUser() throws SQLException;
189:
190: public int getNumBusyConnectionsDefaultUser() throws SQLException;
191:
192: public int getNumUnclosedOrphanedConnectionsDefaultUser()
193: throws SQLException;
194:
195: public int getNumConnections(String username, String password)
196: throws SQLException;
197:
198: public int getNumIdleConnections(String username, String password)
199: throws SQLException;
200:
201: public int getNumBusyConnections(String username, String password)
202: throws SQLException;
203:
204: public int getNumUnclosedOrphanedConnections(String username,
205: String password) throws SQLException;
206:
207: public int getNumBusyConnectionsAllUsers() throws SQLException;
208:
209: public int getNumIdleConnectionsAllUsers() throws SQLException;
210:
211: public int getNumConnectionsAllUsers() throws SQLException;
212:
213: public int getNumUnclosedOrphanedConnectionsAllUsers()
214: throws SQLException;
215:
216: // PooledDataSource operations
217: public void softResetDefaultUser() throws SQLException;
218:
219: public void softReset(String username, String password)
220: throws SQLException;
221:
222: public void softResetAllUsers() throws SQLException;
223:
224: public void hardReset() throws SQLException;
225:
226: public void close() throws SQLException;
227:
228: //JBoss only... (but these methods need not be called for the mbean to work)
229: public void create() throws Exception;
230:
231: public void start() throws Exception;
232:
233: public void stop();
234:
235: public void destroy();
236: }
|