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

Persistence unit with hibernate does not start if datasource is not present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • jpa-2.0.0
    • JPA
    • None

    Description

      When the persistence unit starts aries creates the EntityManagerFactory by calling the PersistenceProvider (hibernate). Hibernate then tries to access the jndi DataSource as it wants to check some db details.

      If the DataSource is not yet up then this call will hang for a long time. This then blocks the startup of the pu bundle. So in effect this can then also block the startup of the DataSource bundle.

      We could either use a separate thread for the EMF creation or only start the creation when the DataSource is actually present.

      Attachments

        Activity

          People

            cschneider Christian Schneider
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: