Bug 400481 - Java EE 7 models
Summary: Java EE 7 models
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: JavaEE7
Keywords:
Depends on: 252615 399524 403207 403226
Blocks:
  Show dependency tree
 
Reported: 2013-02-11 14:56 EST by Carl Anderson CLA
Modified: 2013-03-14 19:02 EDT (History)
6 users (show)

See Also:


Attachments
Initial, rough draft patch (1.31 MB, patch)
2013-03-12 16:18 EDT, Carl Anderson CLA
no flags Details | Diff
Added in missing EPL (1.32 MB, patch)
2013-03-13 17:14 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2013-02-11 14:56:24 EST
EMF models need to be generated from the XML schemas of the Java EE 7 deployment descriptors.
Comment 1 Carl Anderson CLA 2013-03-12 16:18:46 EDT
Created attachment 228308 [details]
Initial, rough draft patch

This patch contains a breaking change- the plugin version id for org.eclipse.jst.j2ee.core has been raised from 1.2.200 to 1.3.0 .  This causes plugins to fail constraints, and will break the build, but due to the changes in this plugin the minor version should be incremented.  In order to use this patch for now, you will have to lower the plugin version id to 1.2.300 or somesuch.

I have run the JUnits against this, and I do not see any new problems introduced.  As such, I am putting this initial patch out for people to see.

One big remaining TODO is handling the Java EE 7

javaee.TransactionSupport

and the Java EE 6

jca.TransactionSupportType

Since this was moved from connector_1_6.xsd down to javaee_1_7.xsd, but we still need to support the Java EE 6 deployment descriptors and models.
Comment 2 Carl Anderson CLA 2013-03-13 12:47:33 EDT
Also, the new files are missing the EPL.
Comment 3 Carl Anderson CLA 2013-03-13 17:14:08 EDT
Created attachment 228386 [details]
Added in missing EPL
Comment 4 Carl Anderson CLA 2013-03-14 13:47:46 EDT
Committed to master for WTP 3.5.0 M6
Comment 5 Carl Anderson CLA 2013-03-14 19:02:43 EDT
I committed an additional fix made necessary by changes in EMF- at the beginning of the initializePackageContents() of each PackageImpl, I changed it from a referencing call out to its parent model to an initializing call out to the parent model.  For example (and most common):

JavaeePackage theJavaeePackage = (JavaeePackage)EPackage.Registry.INSTANCE.getEPackage(JavaeePackage.eNS_URI);

became:

JavaeePackage theJavaeePackage = (JavaeePackage)(EPackage.Registry.INSTANCE.getEPackage(JavaeePackage.eNS_URI) instanceof JavaeePackage ? EPackage.Registry.INSTANCE.getEPackage(JavaeePackage.eNS_URI) : JavaeePackage.eINSTANCE);

This change would have been necessary, irregardless of the Java EE 7 models, but since I found it testing them, I am including it here.