Announcement Announcement Module
Collapse
No announcement yet.
Configuring an @Repository for 2 separate instances with 2 separate Entity Managers?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring an @Repository for 2 separate instances with 2 separate Entity Managers??

    [Container/JPA related question]

    Hi,

    Is there an easy way to wire a repository (annotated with @Repository) to allow 2 separate instances with 2 separate Entity Managers (for use with 2 separate data sources)?

    [I feel like I'm missing something that should be easy here.]

    Duplicating the Implementation of the Repository to provide different annotations to allow a different entity manager seems like overkill...

    Alternatively, how can I do the equivalent of @Repository with pure xml configuration? [e.g. register various @repository classes with a repository factory, arrange for exception translation, etc.]

    Many thanks,
    Rick
    Last edited by RGFanta; May 9th, 2011, 12:44 PM.
Working...
X