KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mchange > v2 > c3p0 > jboss > C3P0PooledDataSourceMBean


1 /*
2  * Distributed as part of c3p0 v.0.9.1
3  *
4  * Copyright (C) 2005 Machinery For Change, Inc.
5  *
6  * Author: Steve Waldman <swaldman@mchange.com>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1, as
10  * published by the Free Software Foundation.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this software; see the file LICENSE. If not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */

22
23
24 package com.mchange.v2.c3p0.jboss;
25
26 import com.mchange.v2.c3p0.*;
27 import java.beans.PropertyVetoException JavaDoc;
28 import java.sql.SQLException JavaDoc;
29 import java.util.Properties JavaDoc;
30 import javax.naming.NamingException JavaDoc;
31
32 public interface C3P0PooledDataSourceMBean
33 {
34     // Jndi Setup
35
public void setJndiName(String JavaDoc jndiName) throws NamingException JavaDoc;
36
37     public String JavaDoc getJndiName();
38
39     // DriverManagerDataSourceProperties
40
public String JavaDoc getDescription();
41     
42     public void setDescription( String JavaDoc description ) throws NamingException JavaDoc;
43     
44     public String JavaDoc getDriverClass();
45     
46     public void setDriverClass( String JavaDoc driverClass ) throws PropertyVetoException JavaDoc, NamingException JavaDoc;
47     
48     public String JavaDoc getJdbcUrl();
49     
50     public void setJdbcUrl( String JavaDoc jdbcUrl ) throws NamingException JavaDoc;
51     
52     // DriverManagerDataSource "virtual properties" based on properties
53
public String JavaDoc getUser();
54     
55     public void setUser( String JavaDoc user ) throws NamingException JavaDoc;
56     
57     public String JavaDoc getPassword();
58     
59     public void setPassword( String JavaDoc password ) throws NamingException JavaDoc;
60
61     // WrapperConnectionPoolDataSource properties
62
public int getUnreturnedConnectionTimeout();
63     public void setUnreturnedConnectionTimeout(int unreturnedConnectionTimeout) throws NamingException JavaDoc;
64     
65     public boolean isDebugUnreturnedConnectionStackTraces();
66     public void setDebugUnreturnedConnectionStackTraces(boolean debugUnreturnedConnectionStackTraces) throws NamingException JavaDoc;
67     
68     public String JavaDoc getConnectionCustomizerClassName();
69     public void setConnectionCustomizerClassName( String JavaDoc connectionCustomizerClassName ) throws NamingException JavaDoc;
70
71     public int getMaxConnectionAge();
72     public void setMaxConnectionAge( int maxConnectionAge ) throws NamingException JavaDoc;
73
74     public int getMaxIdleTimeExcessConnections();
75     public void setMaxIdleTimeExcessConnections( int maxIdleTimeExcessConnections ) throws NamingException JavaDoc;
76     
77     public int getMaxAdministrativeTaskTime();
78     public void setMaxAdministrativeTaskTime( int maxAdministrativeTaskTime ) throws NamingException JavaDoc;
79     
80     public int getCheckoutTimeout();
81     public void setCheckoutTimeout( int checkoutTimeout ) throws NamingException JavaDoc;
82     
83     public int getAcquireIncrement();
84     public void setAcquireIncrement( int acquireIncrement ) throws NamingException JavaDoc;
85     
86     public int getAcquireRetryAttempts();
87     public void setAcquireRetryAttempts( int acquireRetryAttempts ) throws NamingException JavaDoc;
88     
89     public int getAcquireRetryDelay();
90     public void setAcquireRetryDelay( int acquireRetryDelay ) throws NamingException JavaDoc;
91     
92     public boolean isAutoCommitOnClose();
93     public void setAutoCommitOnClose( boolean autoCommitOnClose ) throws NamingException JavaDoc;
94     
95     public String JavaDoc getConnectionTesterClassName();
96     public void setConnectionTesterClassName( String JavaDoc connectionTesterClassName ) throws PropertyVetoException JavaDoc, NamingException JavaDoc;
97     
98     public String JavaDoc getAutomaticTestTable();
99     public void setAutomaticTestTable( String JavaDoc automaticTestTable ) throws NamingException JavaDoc;
100     
101     public boolean isForceIgnoreUnresolvedTransactions();
102     public void setForceIgnoreUnresolvedTransactions( boolean forceIgnoreUnresolvedTransactions ) throws NamingException JavaDoc;
103     
104     public int getIdleConnectionTestPeriod();
105     public void setIdleConnectionTestPeriod( int idleConnectionTestPeriod ) throws NamingException JavaDoc;
106     
107     public int getInitialPoolSize();
108     public void setInitialPoolSize( int initialPoolSize ) throws NamingException JavaDoc;
109
110     public int getMaxIdleTime();
111     public void setMaxIdleTime( int maxIdleTime ) throws NamingException JavaDoc;
112     
113     public int getMaxPoolSize();
114     public void setMaxPoolSize( int maxPoolSize ) throws NamingException JavaDoc;
115     
116     public int getMaxStatements();
117     public void setMaxStatements( int maxStatements ) throws NamingException JavaDoc;
118     
119     public int getMaxStatementsPerConnection();
120     public void setMaxStatementsPerConnection( int maxStatementsPerConnection ) throws NamingException JavaDoc;
121     
122     public int getMinPoolSize();
123     public void setMinPoolSize( int minPoolSize ) throws NamingException JavaDoc;
124     
125     public int getPropertyCycle();
126     public void setPropertyCycle( int propertyCycle ) throws NamingException JavaDoc;
127     
128     public boolean isBreakAfterAcquireFailure();
129     public void setBreakAfterAcquireFailure( boolean breakAfterAcquireFailure ) throws NamingException JavaDoc;
130     
131     public boolean isTestConnectionOnCheckout();
132     public void setTestConnectionOnCheckout( boolean testConnectionOnCheckout ) throws NamingException JavaDoc;
133     
134     public boolean isTestConnectionOnCheckin();
135     public void setTestConnectionOnCheckin( boolean testConnectionOnCheckin ) throws NamingException JavaDoc;
136     
137     public boolean isUsesTraditionalReflectiveProxies();
138     public void setUsesTraditionalReflectiveProxies( boolean usesTraditionalReflectiveProxies ) throws NamingException JavaDoc;
139
140     public String JavaDoc getPreferredTestQuery();
141     public void setPreferredTestQuery( String JavaDoc preferredTestQuery ) throws NamingException JavaDoc;
142
143     // PoolBackedDataSource properties (count: 2)
144
public int getNumHelperThreads();
145     public void setNumHelperThreads( int numHelperThreads ) throws NamingException JavaDoc;
146
147     // shared properties (count: 1)
148
public String JavaDoc getFactoryClassLocation();
149     public void setFactoryClassLocation( String JavaDoc factoryClassLocation ) throws NamingException JavaDoc;
150
151     // PooledDataSource statistics
152

153     public int getNumUserPools() throws SQLException JavaDoc;
154
155     public int getNumConnectionsDefaultUser() throws SQLException JavaDoc;
156     public int getNumIdleConnectionsDefaultUser() throws SQLException JavaDoc;
157     public int getNumBusyConnectionsDefaultUser() throws SQLException JavaDoc;
158     public int getNumUnclosedOrphanedConnectionsDefaultUser() throws SQLException JavaDoc;
159
160     public int getNumConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
161     public int getNumIdleConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
162     public int getNumBusyConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
163     public int getNumUnclosedOrphanedConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
164     public float getEffectivePropertyCycle(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
165
166     public int getNumBusyConnectionsAllUsers() throws SQLException JavaDoc;
167     public int getNumIdleConnectionsAllUsers() throws SQLException JavaDoc;
168     public int getNumConnectionsAllUsers() throws SQLException JavaDoc;
169     public int getNumUnclosedOrphanedConnectionsAllUsers() throws SQLException JavaDoc;
170     public float getEffectivePropertyCycleDefaultUser() throws SQLException JavaDoc;
171
172     // PooledDataSource operations
173
public void softResetDefaultUser() throws SQLException JavaDoc;
174     public void softReset(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc;
175     public void softResetAllUsers() throws SQLException JavaDoc;
176     public void hardReset() throws SQLException JavaDoc;
177     public void close() throws SQLException JavaDoc;
178     
179     //JBoss only... (but these methods need not be called for the mbean to work)
180
public void create() throws Exception JavaDoc;
181     public void start() throws Exception JavaDoc;
182     public void stop();
183     public void destroy();
184 }
185
Popular Tags