Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow configuration of persistence unit in JPA-specific components #19

Closed
abuijze opened this Issue Dec 3, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Owner

abuijze commented Dec 3, 2011

What are the limitations you encounter in the current version? Please provide a simple use-case.
Some of the components (e.g. JpaEventStore) use an EntityManager to retrieve entities from the persistent storage. This only works if it is a container managed EntityManager and there is only a single persistence unit.

Please describe the enhancement you would like to have.
If an application has multiple persistence units, it should be possible to configure the one to use.

Do you have any ideas on how to implement the enhancement? If so, any suggestions are welcome.
JPA uses annotations, which cannot be configured at runtime. Therefore, the EntityManager to use should be extracted in a "provider" class. In such case, an application developer could create a custom implementation that has the correct annotations.

See also: http://groups.google.com/group/axonframework/browse_thread/thread/d8a99c47a87f36e6

@abuijze abuijze was assigned Dec 3, 2011

@abuijze abuijze added a commit that referenced this issue Jan 2, 2012

@abuijze abuijze Added documentation about the EntityManagerProvider.
See issue #19
4af246d

@abuijze abuijze added a commit that referenced this issue Jan 2, 2012

@abuijze abuijze Added documentation about the EntityManagerProvider.
See issue #19
3676500

@abuijze abuijze closed this Jan 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment