Skip to content

Instantly share code, notes, and snippets.

@azell
azell / Spring Txn and jOOQ 3.7.0
Last active April 11, 2020 19:05
Attempting to integrate Spring Transaction with jOOQ 3.7.0
public class SpringExceptionTranslationExecuteListener
extends DefaultExecuteListener {
/** {@inheritDoc} */
@Override
public void exception(ExecuteContext ctx) {
SQLException e = ctx.sqlException();
if (e != null) {
String name = ctx.configuration().dialect().thirdParty().springDbName();
+ 1365195022.125873791 /tmp/go : 7 > rvm install --autolibs=read-only --binary --trace 1.9.3
--autolibs=read-only --binary --trace 1.9.3
rvm 1.19.1 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
+ 1365195022.205960037 /scripts/cli : __rvm_parse_args() 764 > [[ -n '' ]]
+ 1365195022.207334771 /scripts/cli : __rvm_parse_args() 766 > set -o errtrace
+ 1365195022.208645507 /scripts/cli : __rvm_parse_args() 767 > export 'PS4=+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ 1365195022.210013205 /scripts/cli : __rvm_parse_args() 767 > PS4='+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
@azell
azell / gist:5322103
Created April 5, 2013 19:50
Result from running: rvm install --autolibs=read-only --binary --trace 1.9.3
--autolibs=read-only --binary --trace 1.9.3
rvm 1.19.1 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
+ [[ -n '' ]]
+ set -o errtrace
+ export 'PS4=+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ PS4='+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ 1365191040.972879771 /scripts/cli : __rvm_parse_args() 795 > [[ -z install ]]
+ 1365191040.974559260 /scripts/cli : __rvm_parse_args() 798 > [[ error == \i\n\s\t\a\l\l ]]
@azell
azell / SpringExceptionTranslationExecuteListener.java
Created October 17, 2012 01:55
Minimal Spring / jOOQ transaction integration
import javax.sql.DataSource;
import org.jooq.ExecuteContext;
import org.jooq.impl.DefaultExecuteListener;
import org.springframework.jdbc.datasource.DataSourceUtils;
import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator;
import org.springframework.jdbc.support.SQLExceptionTranslator;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
@azell
azell / MockHTable.java
Created November 23, 2011 20:50 — forked from agaoglu/MockHTable.java
MockHTable
/**
* This file is licensed to you 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.