Skip to content

Commit

Permalink
Completed support for using HSQLDB as engine
Browse files Browse the repository at this point in the history
  • Loading branch information
zapodot committed May 2, 2018
1 parent d608261 commit fdb9935
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@ public class CloseSuppressedConnectionFactory {
private CloseSuppressedConnectionFactory() {
}

private final static Class<? extends Connection> proxyType = new ByteBuddy().subclass(Connection.class)
private static final Class<? extends Connection> proxyType = new ByteBuddy().subclass(Connection.class)
.method(any())
.intercept(MethodDelegation.to(
ConnectionInterceptor.class))
ConnectionInterceptor.class))
.defineField("delegatedConnection",
Connection.class,
Visibility.PRIVATE)
Connection.class,
Visibility.PRIVATE)
.implement(ConnectionProxy.class)
.intercept(FieldAccessor.ofBeanProperty())
.intercept(FieldAccessor
.ofBeanProperty())
.make()
.load(CloseSuppressedConnectionFactory.class
.getClassLoader(),
ClassLoadingStrategy.Default.WRAPPER)
.getClassLoader(),
ClassLoadingStrategy.Default.WRAPPER)
.getLoaded();

/**
* Create a proxy that delegates to the provided Connection except for calls to "close()" which will be suppressed.
*
* @param connection the connection that is to be used as an underlying connection
* @return a Connection proxy
*/
Expand Down

0 comments on commit fdb9935

Please sign in to comment.