Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-372

Qualifier on Forge EntityManager

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Obsolete
    • Major
    • None
    • 1.0.0.Beta3
    • Scaffold
    • None

    Description

      The EntityManager (same for the EntityManagerFactory) generated by Forge in org.metawidget.forge.persistence.DatasourceProducer has no Qualifier. It becomes a problem when I need to create my own EntityManager because they both have the @Default qualifier and CDI throws an exception. The only solution is to add a qualifier to my EntityManager but it bother me since I want it to be the default EntityManager.

      To reproduce the problem, just install the seam-persistence plugin, ask "seam-persistence install-managed-persistence-context" and it will generate another EntityManagerFactory with no qualifier and here is the CDI exception.

      Would it be possible to add a qualifier like "@ForgeEntityManager" and "@ForgeEntityManagerFactory" on the DatasourceProducer class ? (and, of course, on the PersistenceUtil class too). This way, if a user add it's own EntityManager, it well be the @Default.

      Thanks.

      Attachments

        Activity

          People

            sachsedaniel Daniel Sachse (Inactive)
            paul.dijou Paul Dijou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: