mirror of
https://github.com/corda/corda.git
synced 2025-03-15 00:36:49 +00:00
Merge OS -> ENT:
NodeStartup - added back Enterprise only serialization case for Oracle database in NodeStartup, added deduplicationId to execute method in classes overriding FlowAsyncOperation
This commit is contained in:
parent
e56d84fd5d
commit
fd19338f62
@ -69,7 +69,7 @@ abstract class AsyncCFTNotaryService : TrustedAuthorityNotaryService() {
|
||||
val timeWindow: TimeWindow?,
|
||||
val references: List<StateRef>
|
||||
): FlowAsyncOperation<Result> {
|
||||
override fun execute(): CordaFuture<Result> {
|
||||
override fun execute(deduplicationId: String): CordaFuture<Result> {
|
||||
return service.commitAsync(inputs, txId, caller, requestSignature, timeWindow, references)
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,6 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
identityService::wellKnownPartyFromX500Name,
|
||||
identityService::wellKnownPartyFromAnonymous,
|
||||
schemaService,
|
||||
configuration.dataSourceProperties,
|
||||
cacheFactory)
|
||||
|
||||
init {
|
||||
|
@ -7,7 +7,6 @@ import io.netty.channel.unix.Errors
|
||||
import net.corda.cliutils.CordaCliWrapper
|
||||
import net.corda.cliutils.CordaVersionProvider
|
||||
import net.corda.cliutils.ExitCodes
|
||||
import net.corda.core.cordapp.Cordapp
|
||||
import net.corda.core.crypto.Crypto
|
||||
import net.corda.core.internal.*
|
||||
import net.corda.core.internal.concurrent.thenMatch
|
||||
@ -417,8 +416,16 @@ open class NodeStartup : CordaCliWrapper("corda", "Runs a Corda Node") {
|
||||
protected open fun loadConfigFile(): Pair<Config, Try<NodeConfiguration>> = cmdLineOptions.loadConfig()
|
||||
|
||||
protected open fun banJavaSerialisation(conf: NodeConfiguration) {
|
||||
// Enterprise only - Oracle database requires additional serialization
|
||||
val isOracleDbDriver = conf.dataSourceProperties.getProperty("dataSource.url", "").startsWith("jdbc:oracle:")
|
||||
val serialFilter =
|
||||
if (isOracleDbDriver) {
|
||||
::oracleJdbcDriverSerialFilter
|
||||
} else {
|
||||
::defaultSerialFilter
|
||||
}
|
||||
// Note that in dev mode this filter can be overridden by a notary service implementation.
|
||||
SerialFilter.install(::defaultSerialFilter)
|
||||
SerialFilter.install(serialFilter)
|
||||
}
|
||||
|
||||
protected open fun getVersionInfo(): VersionInfo {
|
||||
|
@ -10,6 +10,6 @@
|
||||
<include file="migration/vault-schema.changelog-v5.xml"/>
|
||||
<include file="migration/vault-schema.changelog-v6.xml"/>
|
||||
<include file="migration/vault-schema.changelog-pkey-swap.xml"/>
|
||||
|
||||
<include file="migration/vault-schema.changelog-v7.xml"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
@ -52,7 +52,7 @@ class FlowAsyncOperationTests {
|
||||
}
|
||||
|
||||
private class ErroredExecute : FlowAsyncOperation<Unit> {
|
||||
override fun execute(): CordaFuture<Unit> {
|
||||
override fun execute(deduplicationId: String): CordaFuture<Unit> {
|
||||
throw Exception()
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ class FlowAsyncOperationTests {
|
||||
}
|
||||
|
||||
private class ErroredResult : FlowAsyncOperation<Unit> {
|
||||
override fun execute(): CordaFuture<Unit> {
|
||||
override fun execute(deduplicationId: String): CordaFuture<Unit> {
|
||||
val future = openFuture<Unit>()
|
||||
future.setException(Exception())
|
||||
return future
|
||||
@ -103,7 +103,7 @@ class FlowAsyncOperationTests {
|
||||
}
|
||||
|
||||
private class WorkerServiceTask(val completeAllTasks: Boolean, val service: WorkerService) : FlowAsyncOperation<Unit> {
|
||||
override fun execute(): CordaFuture<Unit> {
|
||||
override fun execute(deduplicationId: String): CordaFuture<Unit> {
|
||||
return service.performTask(completeAllTasks)
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ class MySQLNotaryServiceTests : IntegrationTest() {
|
||||
callerParty,
|
||||
requestSignature,
|
||||
null,
|
||||
emptyList()).execute()
|
||||
emptyList()).execute("")
|
||||
}
|
||||
return futures.transpose().get()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user