- Updated to ph-oton 10.6.0, ph-db 8.5.0, ph-web 11.4.5, peppol-commons 12.10.0, peppol-shared-ui 0.10.2, phoss-directory 0.17.3, Flyway 13.5.0 and Jackson 3.2.2
- (SQL) The transaction boundaries of
DBExecutor.performInTransactionwere fixed in ph-db 8.5.0, so that every writing operation of the SQL backend is atomic now.
Previously every statement executed inside a transaction committed the shared connection right after it was executed, so that a failure in the middle of a multi statement operation left the already executed part committed, and the intermediate states of a transaction became visible to concurrent readers on other connections.
Commit and rollback now only happen at the outermost transaction boundary.
Affected is every operation that executes more than one statement: merging Service Information deletes the previous one and then inserts the service metadata, one row per process and one row per endpoint - if one of these inserts failed, the delete stayed committed and the participant was left without any endpoint.
Deleting Service Information (three deletes), creating a Service Group (the service group row and the ownership row) and creating or updating a Business Card (the previous one is deleted and one row per business entity is inserted) behaved the same way.
The stricter rule that comes with the fix - a failed SQL operation or a failed nested transaction marks the whole transaction for rollback, even if the caller evaluates the returnedESuccessor the affected row count and continues - does not change the behaviour of the SMP, because all SQL managers throw on an unexpected number of affected rows instead of continuing.
See ph-db issue #2 - thx @vinit-thummar - The SMP can now be traced and monitored via ph-telemetry, because ph-oton 10.6.0 and ph-db 8.5.0 emit spans and metrics through it.
No configuration property of the SMP is involved, and nothing is emitted as long as no telemetry implementation is registered - without anITelemetryTracerSPIrespectively anITelemetryMeterSPIall emission degrades to cheap no-ops, and the delivered SMP WAR contains none.
To collect the data, addcom.helger.telemetry:ph-telemetry-oteland an OpenTelemetry SDK to a custom build, subclassOtelTelemetryTracerSPIandOtelTelemetryMeterSPIwith a no-argument constructor and register the subclasses viaMETA-INF/services.
Covered are the REST API invocations - the spanphoton.api.invokeplus the instrumentsphoton.api.invocationsandphoton.api.duration, where the metric dimension is the path template like/{ServiceGroupId}/services/{DocumentTypeId}and never the concrete participant ID -, the rendering of the UI pages, the AJAX functions including the server side DataTables processing introduced in v8.4.0, the logins, the logouts and the failed login throttling, the asynchronous tasks of thePhotonWorkerPool- which is where the automatic Directory updates run since v8.4.0 -, the audit trail, the internal errors and the CSRF checks.
For the SQL backend additionally every executed statement, every transaction and every connection acquisition (db.client.operation.duration,phdb.jdbc.statements,phdb.jdbc.transactions,phdb.jdbc.connections,phdb.jdbc.connections.activeandphdb.jdbc.connection.acquire.duration) as well as the Flyway migration run performed at startup are covered.
No user ID, no login name, no IP address, no search text and no SQL parameter value is ever used as a metric dimension. - peppol-commons 12.10.0 no longer depends on Bouncy Castle, because the provider neutral
ph-securityof ph-commons 12.4.0 is sufficient to load the Peppol trust stores. This does not affect the SMP - Bouncy Castle is still on the class path viaph-xmldsig, so aBCFKSkeystore or truststore (smp.keystore.typerespectivelysmp.truststore.type) keeps working as before. - ph-web 11.4.5 caches the system default trust store - the JRE
cacertsrespectively the one named byjavax.net.ssl.trustStore- in memory, instead of loading it again for every created HTTP client that has certificate revocation checking enabled. The cache is invalidated automatically if the path, the type, the password, the file modification date or the file size of the trust store changes. - The generic parts of the server side pagination introduced in v8.4.0 were extracted into ph-oton 10.6.0 -
ITableColumn,SortColumnandTableColumnHelperin the new packagecom.helger.photon.core.pagingas well asDataTablesOnDemandHelperin ph-oton-datatables - and the SMP uses them now.
The SMP classesSMPSortColumn,SMPTableColumnHelperandSMPDataTablesOnDemandwere therefore removed, andISMPTableColumnextendsITableColumnand only adds the mapping onto the SQL columns and the MongoDB fields.
The column enums of the domain objects - likeESMPServiceGroupColumn- follow the ph-oton contract now:getValueProvider ()was replaced bygetSearchValueProvider (), which returnsnullif the column is not searchable, and bygetComparator (), which returnsnullif the column is not sortable, so thatisSearchable ()andisSortable ()are derived from them instead of being declared separately.
This is an API change only - the paging, sorting and searching behave exactly as before.
Full Changelog: phoss-smp-parent-pom-8.4.1...phoss-smp-parent-pom-8.4.2