Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@VertxGen
public enum ServerMode {

DEDICATED("dedicated"), SHARED("shared");
DEDICATED("dedicated"), SHARED("shared"), POOLED("pooled");

private final String mode;

Expand All @@ -28,7 +28,7 @@ public enum ServerMode {
}

public static ServerMode of(String mode) {
return DEDICATED.mode.equalsIgnoreCase(mode) ? DEDICATED : SHARED.mode.equalsIgnoreCase(mode) ? SHARED : null;
return DEDICATED.mode.equalsIgnoreCase(mode) ? DEDICATED : SHARED.mode.equalsIgnoreCase(mode) ? SHARED : POOLED.mode.equalsIgnoreCase(mode) ? POOLED : null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ private static String composeJdbcUrl(OracleConnectOptions options) {
url.append("/").append(encodeUrl(database));
if (options.getServerMode() == ServerMode.SHARED) {
url.append(":").append(ServerMode.SHARED);
} else if (options.getServerMode() == ServerMode.POOLED) {
url.append(":").append(ServerMode.POOLED);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public static Object[][] data() {
.put("serviceName", "orcl")
.put("host", "::1")
.put("serverMode", "dedicated")},
{"uri with service name and server mode pooled", "oracle:thin:@[::1]/orcl:pooled",
new JsonObject()
.put("serviceName", "orcl")
.put("host", "::1")
.put("serverMode", "pooled")},
{"uri with service name with prop", "oracle:thin:@[::1]:1521/orcl?key=val",
new JsonObject()
.put("properties", new JsonObject().put("key", "val"))
Expand Down