Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1969

@PersistenceContext injection point checks

    XMLWordPrintable

Details

    Description

      EntityManager and EntityManagerFactory are the only allowed types for a field/method annotated with @PersistenceContext/@PersistenceUnit. Weld does not allow values of other types to be injected (even if we wanted to, we are constrained by the type of the SPI http://docs.jboss.org/weld/javadoc/2.2/weld-spi/org/jboss/weld/injection/spi/JpaInjectionServices.html).

      There are application servers that allow injection of Hibernate's Session or SessionFactory using @PersistenContext/@PersistenceUnit.

      Due to the SPI type constraints we cannot offer this. We should however not block the integrator from doing this by overly strict validation rules if this is needed.

      Attachments

        Activity

          People

            rhn-engineering-jharting Jozef Hartinger
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: