2
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 2 of the License.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
import com.mysql.clusterj.ClusterJUserException;
21
import com.mysql.jdbc.Connection;
23
import java.sql.SQLException;
24
import java.sql.Savepoint;
25
import java.util.Properties;
27
public class BadConnectionLifecycleInterceptor
28
implements com.mysql.jdbc.ConnectionLifecycleInterceptor {
30
public void close() throws SQLException {
31
// TODO Auto-generated method stub
35
public boolean commit() throws SQLException {
36
// TODO Auto-generated method stub
40
public boolean rollback() throws SQLException {
41
// TODO Auto-generated method stub
45
public boolean rollback(Savepoint arg0) throws SQLException {
46
// TODO Auto-generated method stub
50
public boolean setAutoCommit(boolean arg0) throws SQLException {
51
// TODO Auto-generated method stub
55
public boolean setCatalog(String arg0) throws SQLException {
56
// TODO Auto-generated method stub
60
public boolean transactionBegun() throws SQLException {
61
// TODO Auto-generated method stub
65
public boolean transactionCompleted() throws SQLException {
66
// TODO Auto-generated method stub
70
public void destroy() {
71
// TODO Auto-generated method stub
75
public void init(Connection arg0, Properties arg1) throws SQLException {
76
throw new ClusterJUserException("BadConnectionLifecycleInterceptor is built to fail.");