Skip to content
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

Howto deal with several persistence units? #7

Open
GoogleCodeExporter opened this issue Feb 26, 2016 · 1 comment
Open

Howto deal with several persistence units? #7

GoogleCodeExporter opened this issue Feb 26, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

EntityManager injected via default persistence unit:

    @PersistenceContext
    public final void setEntityManager(EntityManager entityManager) {
        this.entityManager = entityManager;
    }

Howto deal with several persistence units?

Original issue reported on code.google.com by [email protected] on 21 Aug 2010 at 8:44

@GoogleCodeExporter
Copy link
Author

The last commit will help you deal with several persistence units. I removed 
the @PersistenceContext from the GenericDao class. Now, you can use the 
annotation into your own DAO and specify a persistence context name.

The CdiGenericDao contains the @PersistenceContext.

Original comment by [email protected] on 17 Oct 2010 at 1:51

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

No branches or pull requests

1 participant