JEE 5 Support
JEE 5 Support
This page contains information about implementing JEE 5 support in WTP. JEE 5 support is one of the primary tasks in WTP 2.0 release see . If you are interested in JEE 5 support and have questions, comments, etc., about implementation, send a note to the WTP Dev List or contact me, Naci Dai.
The following summary is provided by Chuck Bridgham, Neil Hauge and other in wtp-dev list and describes our current understanding of how we will approach the implementation.
JEE 5 Support
We will create a seperate package for these JEE 5 models. However, these packages must extend the existing J2EE models  for a few reasons:
- EE5 namespace includes legacy J2EE elements. The new EE5 namespace includes the existing 1.4 elements, we can take advantage of the existing models/EMF-DOM XML translators.
- Extending the existing J2EE model will help migration scenarios.
- With the introduction of annotations, the new extended model classes can be adapted using a "new" mapping framework between a annotated JDT AST model (Not JEM).
XML Translator Framework =
The existing J2EE models were originally modeled from the J2EE 1.2 version of the spec (DTD's) using the Rose2Ecore transformation tools. These models were evolved as new spec versions were published, being careful that they were backward compatible, and using the XML translators to "select" the attributes used by each spec version. The XML translator framework has its limitations, and isn't well documented, but it provides a bridge between EMF and different XML models/parsing technologies. Another short coming is that it will built to handle annotation mapping.
The Translator model allows the EMF models to be updated during the editing of in the XML documents (i.e. SSE XML editor). This is critical for implementing high quality tools and editors as the model is always in sync.
JEM and JEE 5 Annotations
Dali has implemented support for relevant portions of the JEE 5 spec using the above techniques. Therefore it provides a prototype for the JEE 5 support. Adapting their EMF model with the JDT AST model, and refactoring out a mapping layer similar to the translator framework, adopters could then publish their own annotation processing layer. WTP could create a reference implentation of this. The XML and annotation models don't match in all cases, and seperate mappings will be required to keep a comon EMF model in synch.
There is general agreement that JEM is not the direction we want to take for modelling annotations. JEM project has not committed for making these enhancements. JEM support would be extremely helpful.
The Java EE annotation classes provide a model, and JEE 5 models in WTP should make an effort to use them not replicate when its possible.
Creating a model around the JDT AST makes the most sense. We also need to do more research regrading the APT api's. There is a general lack of model support for annotations in Eclipse. There are some basic issues in the JDT core that have been around for a long time that make things difficult with regard to annotation support. . This bug requests basic support for annotations in the Java model. This is really where support for annotations should begin. In Dali there is a "util.jdt" with AST and JDT to support annotation configuration. Even at the AST level, annotations are not represented as a first class element, . The JDT team is now actively looking at these issues. Once (and if) they are resolved, it would seem reasonable to take the next step to including specific API's for managing annotations and their complexity.
More feedback is needed here
Most existing WTP tools such as EJBs, Web Services can be extended for JEE 5 support. Th proper mechanism to enable such extensions is likely to be addition of new project facets. Tools will have to introspect projects for JEE5 facets and needs to take proper actions (i.e. add proper deployment descriptors, annotations, etc.). It makes sense to define a standard set of JEE 5 facets and hirarchy so that such tools can be implemented.
JEE 5 Focus Workgroup
A focus group will be setup to oversee the implementation of JEE 5 support. Here is suggested list of participants.
- Chuck Bridgham - As the Component and Tech Lead for the EE5 Models
- Neil Hauge - Mapping Annotations
- Kaloyan Raev - Adopter/Contributor
- And other interested parties.....
We will discus the contents of this page as the agenda of the first meeting.