Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1520

Supplying an external DataSource is not possible with the EntityManagerFactoryBuilder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • jpa-2.3.0
    • jpa-2.4.0
    • JPA
    • None

    Description

      The Aries JPA container provides an EntityManagerFactoryBuilder service so that clients can provide persistence unit configuration at runtime.

      One of the things that clients are supposed to be able to do is to provide ready configured database connections at runtime using the javax.persistence.jtaDataSource and javax.persistence.nonJtaDataSource properties.

      This works for EclipseLink (the JPA RI) but does not with Hibernate or OpenJPA. Both Hibernate and OpenJPA see the PersistenceUnitInfo return null and then fail when they find no Driver class name. The EntityManagerFactoryBuilder can fix this by overriding the PersistenceUnitInfo's DataSource using the supplied standard property names.

      Attachments

        Activity

          People

            timothyjward Timothy James Ward
            timothyjward Timothy James Ward
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: