nla/amberdb — pull request #93 by ato (2014-02-03 00:46:12+00:00)
Title: Fix SQL connection leak

Debugged by setting:

dataSource.setCloseConnectionWatch(true);

BoneCP then gives you a nice stack showing where the connection was forgotten to be closed:

```
Stack trace of location where connection was obtained follows:
java.lang.Thread.getStackTrace(Thread.java:1567)
com.jolbox.bonecp.BoneCP.captureStackTrace(BoneCP.java:572)
com.jolbox.bonecp.BoneCP.watchConnection(BoneCP.java:561)
com.jolbox.bonecp.AbstractConnectionStrategy.postConnection(AbstractConnectionStrategy.java:79)
com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:92)
com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:553)
com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:131)
amberdb.sql.AmberGraph.initPersistence(AmberGraph.java:161)
amberdb.sql.AmberGraph.initGraph(AmberGraph.java:140)
amberdb.sql.AmberGraph.(AmberGraph.java:127)
amberdb.AmberSession.init(AmberSession.java:99)
amberdb.AmberSession.(AmberSession.java:81)
amberdb.AmberDb.begin(AmberDb.java:31)
```

Note there's an awful lot of begins / open without try-finally blocks so things will still leave an exception is thrown, but this looks to be the one that everyone's hitting.