001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.dbcp2;
018
019import java.sql.SQLException;
020
021/**
022 * Defines the attributes and methods that will be exposed via JMX for {@link PoolableConnection} instances.
023 *
024 * @since 2.0
025 */
026public interface PoolableConnectionMXBean {
027
028    void clearCachedState();
029
030    void clearWarnings() throws SQLException;
031
032    void close() throws SQLException;
033
034    boolean getAutoCommit() throws SQLException;
035
036    boolean getCacheState();
037
038    String getCatalog() throws SQLException;
039
040    int getHoldability() throws SQLException;
041
042    String getSchema() throws SQLException;
043
044    String getToString();
045
046    int getTransactionIsolation() throws SQLException;
047
048    boolean isClosed() throws SQLException;
049
050    boolean isReadOnly() throws SQLException;
051
052    void reallyClose() throws SQLException;
053
054    void setAutoCommit(boolean autoCommit) throws SQLException;
055
056    void setCacheState(boolean cacheState);
057
058    void setCatalog(String catalog) throws SQLException;
059
060    void setHoldability(int holdability) throws SQLException;
061
062    void setReadOnly(boolean readOnly) throws SQLException;
063
064    void setSchema(String schema) throws SQLException;
065
066    void setTransactionIsolation(int level) throws SQLException;
067}