We are developing a sort of SDK for internal use which includes some custom annotations, request filters and a few JPA entities for storing information about our organization's users. The SDK is a maven artifact and includes the definition of a persistence unit holding the user information entities.
Our problem is this: we must support multiple applications using our SDK being deployed to the same container or in their own containers. (The SDK's persistence components can't be refactored into their own Microservice)
Our question: since the persistent unit our authorization component uses is defined in the SDK, will it cause problems for multiple Java projects running in the same container to reference the same datasource/persistence unit combination? Or is there a way around this that we can and should implement?