Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

[JPA Service] EntityManagerFactoryBuilder should get a "getUnitProperties" method #13

Open
bjhargrave opened this issue Nov 26, 2011 · 1 comment
Labels
publiccomment Public comment

Comments

@bjhargrave
Copy link
Member

Original bug ID: BZ#136
From: Christoph Läubrich <[email protected]>
Reported version: R4 V4.2

@bjhargrave
Copy link
Member Author

Comment author: Christoph Läubrich <[email protected]>

I refere here to '127.3.4 Custom Configured Entity Manager'.

The specification (indirectly) requires someone using the EntityManagerFactoryBuilder to build custom EntityManagerFactoryS to track the used DatasourceFactory.
Even if it is not written directly the last sentence makes it clear:
"The example does not handle the dynamic dependencies on the associated Data Source Factory service."

But if the Datasource is not provided to the createEntityManagerFactory the "user" has no chance to find out which DatasourceFactory he must track.

There are two options:

  • don't care at all (an might hole stale references to an unregistered DatasourceFactory)
  • unregister and try to reregister each time a Datasourcefactory services changes

Most implementations throw an exception if the datasource is not avaiable even if this is not specified so you can 'probe' for one by calling createEntityManagerFactory but this choice is, as the two others above very inconvenient.

So I think the best would be to allow access to the Unit-Properties by adding a new getUnitProperties Method to the EntityManagerFactoryBuilder interface.

@bjhargrave bjhargrave added the publiccomment Public comment label May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
publiccomment Public comment
Projects
None yet
Development

No branches or pull requests

1 participant