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 // Methods 028 void clearCachedState(); 029 030 void clearWarnings() throws SQLException; 031 032 void close() throws SQLException; 033 034 // Read-write properties 035 boolean getAutoCommit() throws SQLException; 036 037 boolean getCacheState(); 038 039 String getCatalog() throws SQLException; 040 041 int getHoldability() throws SQLException; 042 043 String getSchema() throws SQLException; 044 045 // SQLWarning getWarnings() throws SQLException; 046 String getToString(); 047 048 int getTransactionIsolation() throws SQLException; 049 050 // Read-only properties 051 boolean isClosed() throws SQLException; 052 053 boolean isReadOnly() throws SQLException; 054 055 void reallyClose() throws SQLException; 056 057 void setAutoCommit(boolean autoCommit) throws SQLException; 058 059 void setCacheState(boolean cacheState); 060 061 void setCatalog(String catalog) throws SQLException; 062 063 void setHoldability(int holdability) throws SQLException; 064 065 void setReadOnly(boolean readOnly) throws SQLException; 066 067 void setSchema(String schema) throws SQLException; 068 069 void setTransactionIsolation(int level) throws SQLException; 070}