mirror of
https://github.com/corda/corda.git
synced 2025-04-08 11:54:44 +00:00
ENT-1822 Cash selection db vendor lookup too restrictive (#800)
Cash selection implementation is chosen by matching the beginning of the JDBC driver name, not the entire driver name (effectively it's up to each implementation).
This commit is contained in:
parent
e2ae04b11c
commit
c2c23c482e
@ -23,15 +23,15 @@ import java.util.*
|
||||
class CashSelectionOracleImpl : AbstractCashSelection(maxRetries = 16, retrySleep = 1000, retryCap = 5000) {
|
||||
|
||||
companion object {
|
||||
val JDBC_DRIVER_NAME = "Oracle JDBC driver"
|
||||
const val JDBC_DRIVER_NAME = "Oracle JDBC driver"
|
||||
private val log = contextLogger()
|
||||
}
|
||||
|
||||
override fun isCompatible(metaData: DatabaseMetaData): Boolean {
|
||||
return metaData.driverName == JDBC_DRIVER_NAME
|
||||
return metaData.driverName.startsWith(JDBC_DRIVER_NAME, ignoreCase = true)
|
||||
}
|
||||
|
||||
override fun toString() = "${this::class.java} for $JDBC_DRIVER_NAME"
|
||||
override fun toString() = "${this::class.qualifiedName} for '$JDBC_DRIVER_NAME'"
|
||||
|
||||
override fun executeQuery(connection: Connection, amount: Amount<Currency>, lockId: UUID, notary: Party?,
|
||||
onlyFromIssuerParties: Set<AbstractParty>, withIssuerRefs: Set<OpaqueBytes>, withResultSet: (ResultSet) -> Boolean): Boolean {
|
||||
|
@ -28,7 +28,7 @@ class CashSelectionPostgreSQLImpl : AbstractCashSelection() {
|
||||
}
|
||||
|
||||
override fun isCompatible(metadata: DatabaseMetaData): Boolean {
|
||||
return metadata.driverName == JDBC_DRIVER_NAME
|
||||
return metadata.driverName.startsWith(JDBC_DRIVER_NAME, ignoreCase = true)
|
||||
}
|
||||
|
||||
override fun toString() = "${this::class.qualifiedName} for '$JDBC_DRIVER_NAME'"
|
||||
|
@ -28,15 +28,15 @@ import java.util.*
|
||||
class CashSelectionSQLServerImpl : AbstractCashSelection(maxRetries = 16, retrySleep = 1000, retryCap = 5000) {
|
||||
|
||||
companion object {
|
||||
val JDBC_DRIVER_NAME = "Microsoft JDBC Driver 6.2 for SQL Server"
|
||||
const val JDBC_DRIVER_NAME = "Microsoft JDBC Driver"
|
||||
private val log = contextLogger()
|
||||
}
|
||||
|
||||
override fun isCompatible(metaData: DatabaseMetaData): Boolean {
|
||||
return metaData.driverName == JDBC_DRIVER_NAME
|
||||
return metaData.driverName.startsWith(JDBC_DRIVER_NAME, ignoreCase = true)
|
||||
}
|
||||
|
||||
override fun toString() = "${this::class.java} for $JDBC_DRIVER_NAME"
|
||||
override fun toString() = "${this::class.qualifiedName} for '$JDBC_DRIVER_NAME'"
|
||||
|
||||
override fun executeQuery(connection: Connection, amount: Amount<Currency>, lockId: UUID, notary: Party?,
|
||||
onlyFromIssuerParties: Set<AbstractParty>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user