Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sevasm
Copy link
Contributor

@sevasm sevasm commented Dec 14, 2016

Pull Request Checklist

  • Have you read How to write the perfect pull request?
  • Have you read through the contributor guidelines?
  • Have you signed the Lightbend CLA?
  • Have you [squashed your commits]? (Optional, but makes merge messages nicer.)
  • Have you added copyright headers to new files?
  • Have you checked that both Scala and Java APIs are updated?
  • Have you updated the documentation for both Scala and Java sections?
  • Have you added tests for any changed functionality?

Helpful things

Fixes

Fixes #6792

Purpose

Adds dependency on play.db.DBApi to play.db.jpa.DefaultJPAApi.JPAApiProvider to ensure that data sources are initialised and bound to JNDI before they are accessed.

Background Context

The implementations of JPAApi and DBApi do not have any dependencies that would ensure the order in which they are both created, so there is no guarantee that the data source is bound to JNDI by HikariCPConnectionPool before it is accessed by DefaultJPAApi. By adding a dependency on play.db.DBApi to play.db.jpa.DefaultJPAApi.JPAApiProvider data sources are always initialised and bound to JNDI before they are accessed.

References

…Provider to ensure that data sources are initialised and bound to JNDI before they are accessed
@mkurz mkurz merged commit 745d7d4 into playframework:master Dec 14, 2016
mkurz pushed a commit that referenced this pull request Dec 14, 2016
…Provider to ensure that data sources are initialised and bound to JNDI before they are accessed (#6799)
@mkurz
Copy link
Member

mkurz commented Dec 14, 2016

2.5.x: ffdb70d

@sevasm sevasm deleted the playframework-6792 branch December 14, 2016 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants