-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow full configuration of EntityManagerFactory without persistence.xml #114
Comments
@glassfishrobot Commented |
@glassfishrobot Commented
|
@glassfishrobot Commented Something like having a CDI producer with methods marked with @PersistenceUnitDefinition qualifier:
If CDI producer would be too late in the lifecycle, or dependency on CDI is not convenient, than some kind of listener executed soon enough in the lifecycle. |
@glassfishrobot Commented |
|
I think this needs a bit more justification. Isn't the JPA SPI doing all this for example for the Spring world? Maybe this should just be closed to reduce clutter or marked as very low priority so the focus can be on higher impact work? Reza Rahman Please note views expressed here are my own as an individual community member and do not reflect the views of my employer. |
This was done by #465. |
I'd like to be able to register classes, set a persistence provider, and also add packages to scan (bonus).
In addition, I don't think persistence unit name should be required-at least an exception shouldn't be thrown if no persistence.xml is found or no persistence unit with the name is found.
My end-goal is an hk2 factory, in the JAX-RS context (https://jersey.java.net/documentation/latest/ioc.html) that can be instantiated with a JDBC url, username, password, and package names to scan, and then bound to EntityManager for injection. Without the ability to configure the classes that an entity manager factory loads, this is difficult (requires a persistence xml in the project that uses the factory)
The text was updated successfully, but these errors were encountered: