File tree 1 file changed +8
-1
lines changed
sqldev/src/main/java/org/utplsql/sqldev
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,14 @@ class UtplsqlWorksheet {
43
43
44
44
private def setConnection (String connectionName ) {
45
45
if (connectionName !== null && preferences. unsharedWorksheet) {
46
- this . connectionName = Connections . instance. createPrivateConnection(connectionName)
46
+ // fix for issue #47 - private connections are not closed in SQLDev >= 17.4.0
47
+ try {
48
+ // temporary connection is closed when worksheet is closed, but requires SQLDev >= 17.4.0
49
+ this . connectionName = Connections . instance. createTemporaryConnection(connectionName)
50
+ } catch (Throwable e) {
51
+ // private connection is closed when worksheet is closed in SQLDev < 17.4.0
52
+ this . connectionName = Connections . instance. createPrivateConnection(connectionName)
53
+ }
47
54
} else {
48
55
this . connectionName = connectionName;
49
56
}
You can’t perform that action at this time.
0 commit comments