You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by jgfrm <fr...@gordijn.org> on 2021/09/20 08:42:14 UTC

Modularized persistence

Hi,

I wonder how to implement modularized persistence, e.g. with JPA (but
something else is also OK).
What I want to achieve:
- Each module (feature) is capable to persist its own information, and
cannot access information persisted by other modules directly
- A module can only obtain persisted information by other module via an
API/service published by the module owning the information
- Preferably, it still should be possible to relate entities from the one
module to entities owned by another module ( a solution could be to omit the
foreign key constraint)
- A way to trigger cascaded saves and deletes of entities across multiple
modules (e.g information that owns other information can only be deleted, if
the owned information is deleted to, meaning that the implied foreign key
between the owned and owning information is repected)
- A general/shared mechanism for access control across modules which persist
information, e.g. a user can only access the information he is entitled to.

Thanks

-- Jaap