Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish Ludovic Champenois Oracle Corporation
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.
AGENDA > Java EE 6 > Tools Support IntelliJ Eclipse NetBeans > Demos > Q&A 3
Java EE 6 > A Major new release for Java Enterprise Applications Easier, Smaller, Extensible GlassFish 3 is the Reference Implementation (and a quality product...) GlassFish 3.1 is adding Clustering support > Update Components EJB 3.1 JPA 2.0 Servlet 3.0 JSF 2.0 Interceptors 1.1 JAX-WS 2.2 JSR-109 1.3 JSP 2.2 EL 2.2 JSR-250 1.1 JACC 1.5 Connectors 1.6 > New Components JAX-RS 1.1 CDI 1.0 Bean Validation 1.0 DI 1.0 Managed Beans 1.0 JASPIC 1.1 4
Java EE 6: Impact on Tools > New APIs are easy to expose: Libraries in project path. More and more on Maven (EE 6 APIs in Maven) Automatic Code completion JavaDoc: Some IDEs... > New Concepts: JSF 2.0: face-config obsolete, ManagedBeans obsolete (->CDI) JAX-RS No Web.xml, more annotations > New Packaging: EBJ Inside Web Application Projects! Web Profile versus Full Profile 5
Java EE 6 : Impact on Tools > Alignment of Platform changes and the IDEs Emacs (James Gosling 81), vi (Bill Joy 76): First IDES choice Java EE 6 compliant NetBeans 6.8: same day as Java EE 6 GlassFish (Dec 2009) Almost everything but CDI and advanced JF 2.0 (fixed in 6.9) IntelliJ: Same week as Java EE 6 GlassFish Runtime target Supported in Dec 2009 Eclipse: First IDE Java EE 6 support 6 months later But GlassFish Plugin with EE 6 support before... 6 http://en.wikipedia.org/wiki/editor_wa
Java EE 6 and IntelliJ Code Assistance Code Generation Java EE code completion, javadoc, navigation, refactoring Easy creation of new classes, interfaces, packages, and files Quick generation of standard methods Quick Override/Implement methods Generating "delegation" methods Surrounding of selected code fragment with try/catch, if/else, synchronized,... Generating methods, constants, parameters from unknown usages JP Editor, TagLib support,jsp Refactoring, Ajax, JSF: 2.0 features: Custom Composite Components, Resource Loading (@ResourceDependency, <h:outputscript>, <h:outputstylesheet>) Managed beans and components annotations (@ManagedBean, @FacesComponent, @FacesRenderer, etc.) including code completion, usage search and basic refactoring CDI support (@Named, @Inject : dependencies diagrams, rename, better navigation... 7
Java EE 6 and IntelliJ JSF-aware coding assistance with code completion and formatting Graphical face-config editing EJB 3.1, including support for EJB 3.1 @Singleton Session Bean JPA 2.0 Support JPA 2.0 @ElementCollection attribute type, plus freshly allowed attribute types in embeddable objects (@OneToOne, @Embedded, etc.) JPA 1.0/2.0 with Hibernate provider will not throw false-positive warnings about certain JPA specification violations that occur because of differences in JPA and Hibernate. JPQ QL support Generate from DB 8
IntelliJ: What could be improved > Registering a new GlassFish Java EE 6 runtime > API libraries customization Download from the Web why? Using the ones provided by the GlassFish Runtime > Lack of complete Java EE 6 Javadoc code completion > Some EE 6 Specific wizards missing Cannot create a servlet without web.xml (even if servlet 3.0 is selected) EJB inside Web App, JAX-RS Resources, Bean Validation... Easy to create once you know the corresponding annotations 9
Eclipse Helios (3.6) > Eclipse 3.6 will introduce Java EE 6 artifacts (June 2010) EJB 3.1 (Inside Web App, no interface needed) Web.xml optional Servlet, Filter, Listener annotated, Facelets XHTML JPA 2.0 is excellent (EclipseLink used in WebLogic and GlassFish EE 6) Java EE 6 XML schemas > But not complete support No Jax-RS wizards, No Beans Validation JSF 2.0 lacking code completion for annotated artifacts Still very faces-config driven No CDI support at all: you need to discover it > Still Too JSRs centric as Opposed to Java EE 6 centric > More in December 2010 Update Release (I hope...) 10
Eclipse and Oracle Involvement > Oracle has many Eclipse Committers > JPA: EclipseLink is developed in Eclipse JPA Dali Tools: up to date, and comprehensive > Core Java EE tooling Facet framework in Eclipse done by Oracle folks > JSF Most JSF Eclipse tooling done by Oracle folks Jboss Tools has their own JSF tooling > Jax-RS, Jax-WS, EJB, CDI, Bean Validation: Need more involvement with the Eclipse community 11
Oracle OEPE Pack for Eclipse > Zip bundle or update center > Target WebLogic Server and Glassfish via Eclipse Plugin For Java EE 6: Extra wizards for JAX RS, EJB Singleton, Java EE 6 Javadoc Code Completion Tight integration with GlassFish Java EE 6: Start, Stop, Debug, Profile (TPTP) Fast Deploy On Save Session Preservation at redeployment time Exploded directory deployment > Better JSF/JSP tooling > Facelet XHTML support > SpringSource Tooling > JAX-WS wizards (only work with WebLogic target) > Free: Close source and close license 12
NetBeans > Close relationship with the Java EE 6 Platform development NetBeans 6.8 shipped same day, with GlassFish bundled in it > Strong Java EE 6 Development Web Profile, Full Profile Many EE 6 Wizards End to End Wizards (DB to JPA, JPA to REST, JPA to JSF 2.0...) Maven Java EE 6 targets > Tight Integration with the GlassFish Runtime Bundled Deploy On Save, Session Preservation Resources definitions and deployment > NetBeans 6.9 (Soon) adds CDI and better JSF 2.0 support 13
Java EE 6 IntelliJ Eclipse NetBeans Java Support Java EE 6 JPA 2.0 Helios: first release EclipseLink CDI Need JBossTools 6.9 Servlet 3.0 bugs? Skeleton Working default JAX-WS JAX-RS EJB 3.1 Maven Axis<-->JAX-WS JBossTools<->Oracle Wizards only via GlassFish Plugin Yellow-ish End to End Incubator (PAVE) REST, JPA, JSF GlassFish 3.x Profile,debug,deploy on save, Profile,debug, deploy on save,remote, admin, 14 OSGi / EE 6 Green-ish
Java EE 6 In IDEs > IntelliJ http://www.jetbrains.com/idea/ > Eclipse https://glassfishplugins.dev.java.net/ > NetBeans http://netbeans.org/ 15
Q&A 16
Ludovic Champenois Oracle https://glassfish.dev.java.net ludo@dev.java.net