Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. Start New JPA Project wizard. 2. Check [Add project to an EAR] on the first page of the wizard. 3. Specify non-existing project name for the [EAR Project Name]. Then, an ear project is generated, but the format is J2EE1.4. Originally, the format should be Java EE 5.0. More information: The version of EAR seems to be selected appropriately for EJB or Web module according to its version.
Created attachment 111548 [details] a sample patch The patch is made by the following rule. The version of EAR is decided according to the version of the Java used.
Using JPA for application managed persistence in Java EE 1.4 is supported as long as you have JDK 5 or up. So defaulting based on JDK is not going to work. The user needs to be asked what version of EAR they want to create. --Shaun
I think the heart of this issue is what to use as a default version if the user doesn't select one. During project creation, the user can create a new EAR and configure it with the appropriate version. We are using a generic WTP facet page for this part of project creation so this is the standard mechanism. It make more sense in this case to default based on the JDK, like other components do, or at the least, default to 1.5. Thoughts?
I agree that defaulting an EAR to EE 5 makes sense for JPA 1.0. If we go with the EE version that includes a specific JPA version then we'll need to be able to default a JPA 2.0 application to an EE 6 EAR.
After more investigation, I have determined that this bug is closely tied with our use of the JST's Utility Facet. See the underlying issue in bug 234383. The problem is that the Utility Facet controls our creation of the EAR project. As a result, we cannot change this behavior without replacing the functionality we are getting with the Utility Facet. If we remove our dependency on the Utility Facet, this issue can be addressed. Targeting to 2.2 based on dependency with blocking bug.
targeting to future since the dependent bug is not going to be fixed in 2.2
I think this might already be fixed as a result of fixing bug 234383. If not, we should be able to address it now
The current default in Helios is EAR 6.0. The user can change this default by clicking the "New Project" button next to the EAR project selection. Defaulting to 6.0 is decided by underlying WTP functionality and is likely a result of selecting the latest possible version. I think this functionality is reasonable from a Dali perspective. If seen otherwise, please upon a bug against the Java EE project.
Verified in Build I-3.3.0-20100901095216 Verified the EAR project defaults to 6.0 when creating a new JPA Package. http://wiki.eclipse.org/Dali_3.0_M2