Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 246035 - J2EE 1.4 EAR project is generated by the JPA project wizard
Summary: J2EE 1.4 EAR project is generated by the JPA project wizard
Status: VERIFIED WONTFIX
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 234383
Blocks:
  Show dependency tree
 
Reported: 2008-09-03 00:35 EDT by Masashi Sato CLA
Modified: 2010-10-27 13:52 EDT (History)
6 users (show)

See Also:


Attachments
a sample patch (2.51 KB, patch)
2008-09-03 00:40 EDT, Masashi Sato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masashi Sato CLA 2008-09-03 00:35:13 EDT
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.
Comment 1 Masashi Sato CLA 2008-09-03 00:40:14 EDT
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.
Comment 2 Shaun Smith CLA 2008-09-03 10:04:14 EDT
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
Comment 3 Neil Hauge CLA 2008-09-19 14:55:03 EDT
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?
Comment 4 Shaun Smith CLA 2008-11-14 12:25:55 EST
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.
Comment 5 Neil Hauge CLA 2008-12-01 12:28:13 EST
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.


Comment 6 Karen Butzke CLA 2009-05-20 09:41:35 EDT
targeting to future since the dependent bug is not going to be fixed in 2.2
Comment 7 Karen Butzke CLA 2010-08-18 11:47:53 EDT
I think this might already be fixed as a result of fixing bug 234383. If not, we should be able to address it now
Comment 8 Neil Hauge CLA 2010-09-27 17:24:58 EDT
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.
Comment 9 Jolene Moffitt CLA 2010-10-27 13:52:33 EDT
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