Add database-backed partnership factory supporting all OpenAS2 databases#559
Merged
uhurusurfa merged 1 commit intoJul 17, 2026
Merged
Conversation
Adds org.openas2.partner.DbPartnershipFactory as an alternative to XMLPartnershipFactory, storing partners and partnerships in database tables instead of the partnerships XML file. Works with any JDBC database (embedded H2, Azure SQL, PostgreSQL, MySQL, Oracle) using the same connection parameters as the DbTrackingModule. - New tables partner, partner_attribute, partnership and partnership_attribute added to openas2-schema.xml (ddlutils, for all supported platforms) and db_ddl.sql (H2). Attribute categories: attribute, sender/receiver overrides and pollerConfig. - Partner/partnership add and delete console and REST API commands dispatch on factory type and write to the database, including pollerConfig.* parameters. - Per-partnership directory pollers are launched from pollerConfig category rows, reusing the pollerConfigBase merge and $partnership.*$ placeholder logic shared via BasePartnershipFactory. - In-memory state reloads at startup, after every API change, via the refresh command and on an optional fixed interval. - Tracking module DB handlers made public for reuse by the factory. Verified with unit tests plus a live server run exercising the REST API (add/view/delete partners and partnerships, poller launch, persistence across restart).
Contributor
Author
|
This will likely require a change to the documentation PDF. Is that somewhere that can be edited? Or do you want a write-up of what should be added? |
Contributor
FYI: There is a major new version (5.X) in the pipeline that moves away from XML based configuration and requires major changes to the documentation. The changes in V5 are not backwards compatible for the most part and includes:
Version 4.X will be maintained for security releases for a short while after the release of v5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds org.openas2.partner.DbPartnershipFactory as an alternative to XMLPartnershipFactory, storing partners and partnerships in database tables instead of the partnerships XML file. Works with any JDBC database (embedded H2, MSSql, PostgreSQL, MySQL, Oracle) using the same connection parameters as the DbTrackingModule.
Verified with unit tests plus a live server run exercising the REST API (add/view/delete partners and partnerships, poller launch, persistence across restart).