Java JDBC Collection Transaction rollback(final Connection connection)

Here you can find the source of rollback(final Connection connection)

Description

rollback

License

Apache License

Declaration

public static boolean rollback(final Connection connection) 

Method Source Code

//package com.java2s;
/**/*from w  ww  . j  a  va2s.  c o  m*/
 * Copyright 2012-2015 Niall Gallagher
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.sql.*;

public class Main {
    public static boolean rollback(final Connection connection) {
        try {
            connection.rollback();
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}

Related

  1. rollback(Connection connection)
  2. rollback(Connection connection)
  3. rollback(Connection connection)
  4. rollback(Connection sqlConn)
  5. rollback(final Connection conn, final Logger logger)
  6. rollbackAndClose(Connection con)
  7. rollbackAndCloseQuietly(Connection conn)
  8. rollbackQuietly(Connection conn)
  9. rollbackQuietly(Connection conn)