Skip to main content

[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-70) Allow two phase bootstrap approach to creating the EntityManagerFactory

  • From: "smarlow (JIRA)" < >
  • To:
  • Subject: [jpa-spec issues] [JIRA] Commented: (JPA_SPEC-70) Allow two phase bootstrap approach to creating the EntityManagerFactory
  • Date: Thu, 9 Jan 2014 23:55:49 +0000 (UTC)
  • Auto-submitted: auto-generated


    [ 
https://java.net/jira/browse/JPA_SPEC-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=372198#action_372198
 ] 

smarlow commented on JPA_SPEC-70:
---------------------------------

{quote}
One question though; the two phases are thus needed for 
@DataSourceDefinition, but what about data sources that are defined in 
web.xml, ejb-jar.xml or application.xml.
{quote}

Data sources that are defined in web.xml, ebj-jar.xml or application.xml 
should also benefit by the change to bootstrap the persistence unit via two 
phases.

{quote}
Can't they be scanned and processed first without requiring the two phases?
{quote}

It will vary between application server implementations, when the data 
sources are available.  On application servers that can start the data source 
earlier, supporting the two-phase pu bootstrap will also improve CDI 
injection in entity listeners (creating the bean manager will not prevent 
entity class enhancement).



> Allow two phase bootstrap approach to creating the EntityManagerFactory
> -----------------------------------------------------------------------
>
>                 Key: JPA_SPEC-70
>                 URL: https://java.net/jira/browse/JPA_SPEC-70
>             Project: jpa-spec
>          Issue Type: Improvement
>            Reporter: smarlow
>
> Introduce a standard two phase persistence unit bootstrap and require that 
> certain services are not accessed until the second phase.  This will 
> improve how JPA/CDI + JPA/@DataSourceDefinition work together.
> In a perfect world, the first persistence unit bootstrap phase should not 
> use the datasource or the CDI bean manager (instead wait for the second 
> phase).  Class enhancing/rewriting should also occur in the first phase 
> (before application classes have been read).
> This will help avoid use of the CDI bean manager too early (which otherwise 
> can cause application entity classes to be loaded before they are 
> enhanced/rewritten).
> This will help avoid use of a datasource that is being deployed with the 
> application (@DataSourceDefinition) but may not be available for use yet.
> Also see discussion at 
> [https://java.net/projects/jpa-spec/lists/jsr338-experts/archive/2013-06/message/0].

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[jpa-spec issues] [JIRA] Created: (JPA_SPEC-70) Allow two phase bootstrap approach to creating the EntityManagerFactory

smarlow (JIRA) 01/09/2014

[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-70) Allow two phase bootstrap approach to creating the EntityManagerFactory

arjan tijms (JIRA) 01/09/2014

[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-70) Allow two phase bootstrap approach to creating the EntityManagerFactory

smarlow (JIRA) 01/09/2014
 
 
Close
loading
Please Confirm
Close