/** * Close the given Connection. * * @param con the Connection to close */ protected void closeConnection(Connection con) { try { con.close(); } catch (Throwable ex) { logger.warn("Could not close shared CCI Connection", ex); } }
/** * Closes a connection object from the given connection factory. * * <p>The default implementation assumes a JCA {@link Connection}. Subclasses should override, if * they use another type of connection. * * @param connection * @param factory */ public void closeConnection(C connection, F factory) { if (connection == null) { return; } if (connection instanceof Connection) { try { ((Connection) connection).close(); } catch (ResourceException e) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, e, "Error closing"); // $NON-NLS-1$ } return; } throw new AssertionError( "A connection was created, but no implementation provided for closeConnection"); //$NON-NLS-1$ }
/** * This method closes the interaction and the connection to a JRA resource. * * @return True if successful, false if not. */ public void closeConnectionInteraction() { try { try { if (interaction != null) { interaction.close(); } } catch (Throwable e) { TransactionHelper.logDataException( callingFunctionName, "Failure closing the interaction with: ", e); } if (connection != null) { connection.close(); } } catch (Throwable e) { TransactionHelper.logDataException( callingFunctionName, "Failure closeConnectionInteraction: ", e); } }
public void cnCloseConn() throws Exception { log.info(tid() + " CN_CLOSE_CONN (" + id + ")"); Connection conn = (Connection) connections.get(id); conn.close(); }