mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Requery removal (#1276)
* Removed Requery object relational mapping usage (and associated schemas including node-schemas module) * Fixed issues with NodeAttachmentService tests. Cannot use JPA custom converters with Primary Key fields. Hibernate entities require explicit call to flush() to persist to disk. * Removed redundant requery converters (equivalents not even required in Hibernate). * Removed remaining gradle requery dependency definitions. * Fixed broken tests. * Fixes for failing NodeVaultService tests: - Dynamic SQL updates (in soft locking code) - Explicit request by session to participate in transaction (causing "TransactionRequiredException" Executing an update/delete query) - Explicit flush() required to persist to disk * Updated changelog. Fixed compiler warning. * Fixed WHERE clause AND/OR condition. Enforced immediate data visibility through transaction commit. * Final fixes to address failing tests. * Deferred all hibernate session/txn management to DatabaseTransactionManager. * Fixed transaction boundaries in failing Cash tests. * Fixes to address failing tests (transaction boundaries, merge detached object, config clean-up). * Final adjustment to transaction boundaries in JUnit tests. * Refactored AttachmentSchemaV1 into NodeAttachmentService itself and referenced from NodeServicesV1. * Refactored HSQL UPDATE statements to use CriteriaUpdate API. * Updated all criteria API getters to reference attribute names by type. * Remove redundant VaultSchema entity name (required when previously using HSQL UPDATE syntax) * Fix compiler warnings. * Minor changes following rebase from master. * Fixed suppress warning type.
This commit is contained in:
@ -8,7 +8,6 @@ import com.esotericsoftware.kryo.Serializer
|
||||
import com.esotericsoftware.kryo.io.Input
|
||||
import com.esotericsoftware.kryo.io.Output
|
||||
import com.esotericsoftware.kryo.pool.KryoPool
|
||||
import io.requery.util.CloseableIterator
|
||||
import net.corda.core.internal.LazyPool
|
||||
import net.corda.core.serialization.*
|
||||
import net.corda.core.utilities.ByteSequence
|
||||
@ -103,14 +102,9 @@ open class SerializationFactoryImpl : SerializationFactory {
|
||||
|
||||
private object AutoCloseableSerialisationDetector : Serializer<AutoCloseable>() {
|
||||
override fun write(kryo: Kryo, output: Output, closeable: AutoCloseable) {
|
||||
val message = if (closeable is CloseableIterator<*>) {
|
||||
"A live Iterator pointing to the database has been detected during flow checkpointing. This may be due " +
|
||||
"to a Vault query - move it into a private method."
|
||||
} else {
|
||||
"${closeable.javaClass.name}, which is a closeable resource, has been detected during flow checkpointing. " +
|
||||
val message = "${closeable.javaClass.name}, which is a closeable resource, has been detected during flow checkpointing. " +
|
||||
"Restoring such resources across node restarts is not supported. Make sure code accessing it is " +
|
||||
"confined to a private method or the reference is nulled out."
|
||||
}
|
||||
throw UnsupportedOperationException(message)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user