Wednesday Feb 27, 2013

Transparency and Community Participation in Java EE 7


Ever since the launch of Java EE 7 and its component JSRs, Oracle has been very committed to a high level of transparency for all of the JSRs under the Java EE 7 umbrella. We're so excited that increased transparency has resulted in more useful feedback that has improved the Java EE platform. Let me tell you what we've done, how it's helped, and how you can get involved too.

One of the requirements for JCP 2.8 is:

When voting to approve a JSR's transition to the next stage, EC members are expected to take into consideration the extent to which the Spec Lead is meeting the transparency requirements.

Now that many of these JSRs have gone through the Public Review Ballot and others are in progress, it is useful to review how they have contributed to the transparency process.

First of all, all Java EE 7 Expert Groups are operating using the transparency rules defined JCP 2.8. The transparency rule requires:
  1. Public can read the names on the Expert Group
  2. Expert Group business is regularly reported on a publicly readable alias
  3. Mechanism for allow public to provide feedback
  4. Spec lead respond to the posts on the alias
  5. Schedule of JSR is publicly available, current, and updated regularly
  6. Open source process for the development of RI and/or TCK
  7. Publicly readable and/or writable issue-tracker
  8. Publicly accessible document archive
Happy to report that all the JSRs in Java EE 7 have followed the guidelines mentioned above. Providing a specific example using JSR 342:
  1. JSR 342 has all the Expert Group member names publicly listed
  2. All technical discussions on the Expert Group are reported on jsr342-experts@javaee-spec.java.net alias and archived
  3. Anybody outside the Expert Group can subscribe to the alias at users@javaee-spec.java.net and provide feedback
  4. Spec leads regularly read and respond on the alias
  5. Schedule of JSR is publicly reported at javaee-spec.java.net
  6. GlassFish is the Reference Implementation and is completely built in open source. The promoted builds have been available for several months, the schedule is completely transparent, maven coordinates are published, and NetBeans tooling is available for some time. All this allows developers to play with the bleeding edge Java EE 7 technologies as they are integrated in GlassFish. Public forum allows the users to communicate specifically about the RI.
  7. Publicly readable/writable issue tracker
  8. Publicly accessible document archive
The transparency checklist by each JSR is explained in the table below.

Many of our spec leads have gone beyond this in their outreach to the community with blogs, talks, chats, and more. The Java EE 7 Expert Group recently concluded a public survey seeking community input to define key areas in the platform such as which specifications should be included in the Web Profile, should CDI be enabled by default, expanded use of @Stereotype, and expansions of Interceptors to all Java EE components. Over 1100 respondents voted, make their voices heard, and help decide the direction of the platform.

The table below provides:
  • Public website for each specification in Java EE 7. All of our JSRs that are part of the Java EE 7 Platform are being run in the open, using java.net projects.  These JSRs, and links to their respective projects are listed on the home page of the Java EE 7 Platform JSR and in the table below. Each page has publicly viewable Expert Group mailing lists as Users observer lists. The Users lists receive copies of all expert group emails, as well as providing users the ability to post feedback and engage in discussions with each other and with expert group members. All lists have publicly viewable archives on the java.net project sites.

    Similarly, all projects have publicly accessible download areas, and JIRA issue trackers where bugs and suggestions for new features can be posted, and which also serve as another means of discussion with EG members. The schedules and interim drafts of the specification were posted on the main project page and publicly visible Downloads area.
  • Transparency Checklist columns shows the status of different JSRs meeting the transparency requirements of JCP 2.8.
  • Community Participation represents the increase in community participation above and beyond the core Expert Group for each Specification. As you can see the participation from the community outside the Expert Group is pretty significant and has worked really well.
  • To encourage further community participation, different Java EE 7 Expert Groups defined specific areas to provide feedback using Adopt-a-JSR. We saw tremendous success with the effort with several JUGs joining the effort. The last column lists different JUGs that have adopted a particular JSR. In several cases, JUGs have adopted multiple JSRs.

Specification / JSR Transparency Checklist
Community
Participation
Adopt-a-JSR
A B C D E F G H
Concurrency (JSR 236)

~250%

JPA (JSR 338)
~250%
Chennai JUG
Hyderabad JUG
JAX-RS (JSR 339)
~350%
CE JUG
Indonesia JUG
LJC
Madrid JUG
Morocco JUG
Peru JUG
SouJava
Servlet (JSR 340)
~350%

EL (JSR 341)
~125%

Java EE 7 (JSR 342)
~600%
LJC
JMS (JSR 343)
~500%
FASO JUG
Indonesia JUG
LJC
Peru JUG
JSF 2.2 (JSR 344)
~200%
CE JUG
Chennai JUG
Cologne JUG
Hyderabad JUG
SouJava
EJB (JSR 345)
~300%
SouJava Campinas JUG
CDI (JSR 346)
Only public forum
Chennai JUG
Hyderabad JUG
Indonesia JUG
LJC
Bean Validation (JSR 349) Only public forum
SouJava
Batch (JSR 352)
~750%
Chennai JUG
LJC, SouJava
JSON (JSR 353)
~650%
CE JUG
Congo JUG
LJC
Mbale JUG
Morocco JUG
Peru JUG
SouJava
Toronto JUG
WebSocket (JSR 356)
~400%
BeJUG
LJC
Chennai JUG
Morocco JUG
CEJUG
NY SIG

The map below shows geographical coordinates for different JUGs participating in the Adopt-a-JSR effort for Java EE 7:


View Java EE 7 Adopt-a-JSR Maps in a larger map

Specific contributions from Adopt-a-JSR effort:
  • London Java Community (LJC) organized a WebSocket and JSON Hack Day. The event was sold out within 2 hours and had 17 people on the waiting list. The event started with a presentation on explaining the APIs in Java API for WebSocket (JSR 353) and Java API for JSON Processing (JSR 353). The attendees designed a Market Ticker application. All the presentation material and source code was shared publicly. LJC also created projects (cdiex-palindrom-jsf and cdiex-datastore) to test CDI 1.1 specification.
  • Chennai JUG is building a multi-player game that can be played across the Internet. The application uses Java API for WebSocket 1.0 (JSR 356), Java API for JSON Processing 1.0 (JSR 353), Java Persistence API 2.1 (JSR 338), JavaServer Faces 2.2 (JSR 344) and Batch Applications for Java Platform (JSR 352) and/or Enterprise JavaBeans 3.2 (JSR 345) and so provide a holistic experience of building a Java EE 7 application. The energetic JUG meets regularly using G+ hangouts and in the neighborhood coffee shops to coordinate. And then they go hacking the application on github.  There are 5 developers that are regularly contributing to the application and the JUG plans to incorporate several other technologies as part of an ongoing effort.
  • Morocco JUG will be presenting on Java EE 7, WebSocket, and JSON at Java Developer Conference, Cairo, Egypt.
  • Cologne JUG had a meetup on about JSF 2.2 and another one on CDI 1.1 (video).
  • BeJUG has adopted JSR 356 have planned a hackathon on Mar 6th. They plan to build a cross-browser Tic-Tac-Toe application using JSR 356. One of the JUG members is on its way to become a committer in Tyrus - the Reference Implementation for JSR 356.
  • Ceara JUG has planned a set of presentations on Mar 9 by on JAX-RS 2.0 (JSR 339), Java API for JSON Processing (JSR 353), JavaServer Faces 2.2 (JSR 344), and Java API for WebSocket (JSR 356).
  • San Francisco JUG organized a Java EE 7 and WebSocket session and planning a session on JAX-RS 2.0.
  • SouJava is contributing by adding new features from JSF 2.2 to Scrum Toys.
Several other JUGs are doing an outstanding work and contributing towards making Java EE 7 as the best release ever. All these efforts truly indicate that Java EE 7 is getting grass roots participation from the global community. This truly allows early feedback on the specification and implementation from the end user and developers who will eventually use these APIs. Overall this leads to a higher quality deliverables and will hopefully eventually lead to a faster adoption as well.

Even though many of the JSRs have gone through Public Review Ballot and others are in progress, its never too late to contribute. So how do you contribute ? Just follow this three step process:
  • Join a JUG: If you do not participate in your local Java User Group, then find your local JUG and participate. There are several already active JUGs around the world. If one does not exist in your neighborhood, now is your time to shine as a leader and start one.
  • Participate in Adopt-a-JSR: Encourage JUG members to participate in the global Adopt-a-JSR effort. Several JUGs are already participating and contributing very effectively.
  • Share the joy: Pick any of the Java EE 7 JSRs that are particularly interesting, download GlassFish 4 promoted builds, read javadocs, build a sample application, provide feedback to the Expert Group, and share the joy!
Adopt-a-JSR for Java EE 7: Getting Started provide more details on how your JUGs can contribute effectively.

Java EE 7 JSRs are truly operating in a fully transparent manner and took community participation to a new level. We are always ready for feedback!

Sunday Sep 30, 2012

JavaOne 2012 Pictures - Java Leaders Brunch and GlassFish Community Event


Some pictures from the Java Leaders Brunch ...










And some pictures from the GlassFish Community Event (with 110+ attendees) ...








And the evolving album ...



Thursday Mar 22, 2012

Why is Java EE 6 better than Spring ?


Java EE 6 was released over 2 years ago and now there are 14 compliant application servers. In all my talks around the world, a question that is frequently asked is

Why should I use Java EE 6 instead of Spring ?

There are already several blogs covering that topic:
I will try to share my perspective in this blog.

First of all, I'd like to start with a note:

Thank you Spring framework for filling the interim gap and providing functionality that is now included in the mainstream Java EE 6 application servers. The Java EE platform has evolved over the years learning from frameworks like Spring and provides all the functionality to build an enterprise application. Thank you very much Spring framework!

While Spring was revolutionary in its time and is still very popular and quite main stream in the same way Struts was circa 2003, it really is last generation's framework - some people are even calling it legacy. However my theory is "code is king". So my approach is to build/take a simple Hello World CRUD application in Java EE 6 and Spring and compare the deployable artifacts.

I started looking at the official tutorial Developing a Spring Framework MVC Application Step-by-Step but it is using the older version 2.5. I wasn't able to find any updated version in the current 3.1 release. Next, I downloaded Spring Tool Suite and thought that would provide some template samples to get started. A least a quick search did not show any handy tutorials - either video or text-based. So I searched and found a link to their SVN repository at src.springframework.org/svn/spring-samples/.

I tried the "mvc-basic" sample and the generated WAR file was 4.43 MB. While it was named a "basic" sample it seemed to come with 19 different libraries bundled but it was what I could find:

./WEB-INF/lib/aopalliance-1.0.jar
./WEB-INF/lib/hibernate-validator-4.1.0.Final.jar
./WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
./WEB-INF/lib/joda-time-1.6.2.jar
./WEB-INF/lib/joda-time-jsptags-1.0.2.jar
./WEB-INF/lib/jstl-1.2.jar
./WEB-INF/lib/log4j-1.2.16.jar
./WEB-INF/lib/slf4j-api-1.6.1.jar
./WEB-INF/lib/slf4j-log4j12-1.6.1.jar
./WEB-INF/lib/spring-aop-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-asm-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-beans-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-context-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-context-support-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-core-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-expression-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-web-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-webmvc-3.0.5.RELEASE.jar
./WEB-INF/lib/validation-api-1.0.0.GA.jar
And it is not even using any database!

The app deployed fine on GlassFish 3.1.2 but the "@Controller Example" link did not work as it was missing the context root. With a bit of tweaking I could deploy the application and assume that the account got created because no error was displayed in the browser or server log.

Next I generated the WAR for "mvc-ajax" and the 5.1 MB WAR had 20 JARs (1 removed, 2 added):

./WEB-INF/lib/aopalliance-1.0.jar
./WEB-INF/lib/hibernate-validator-4.1.0.Final.jar
./WEB-INF/lib/jackson-core-asl-1.6.4.jar
./WEB-INF/lib/jackson-mapper-asl-1.6.4.jar
./WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
./WEB-INF/lib/joda-time-1.6.2.jar
./WEB-INF/lib/jstl-1.2.jar
./WEB-INF/lib/log4j-1.2.16.jar
./WEB-INF/lib/slf4j-api-1.6.1.jar
./WEB-INF/lib/slf4j-log4j12-1.6.1.jar
./WEB-INF/lib/spring-aop-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-asm-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-beans-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-context-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-context-support-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-core-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-expression-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-web-3.0.5.RELEASE.jar
./WEB-INF/lib/spring-webmvc-3.0.5.RELEASE.jar
./WEB-INF/lib/validation-api-1.0.0.GA.jar
2 more JARs for just doing Ajax.

Anyway, deploying this application gave the following error:

Caused by: java.lang.NoSuchMethodError: org.codehaus.jackson.map.SerializationConfig.<init>(Lorg/codehaus/jackson/map/ClassIntrospector;Lorg/codehaus/jackson/map/AnnotationIntrospector;Lorg/codehaus/jackson/map/introspect/VisibilityChecker;Lorg/codehaus/jackson/map/jsontype/SubtypeResolver;)V
    at org.springframework.samples.mvc.ajax.json.ConversionServiceAwareObjectMapper.<init>(ConversionServiceAwareObjectMapper.java:20)
    at org.springframework.samples.mvc.ajax.json.JacksonConversionServiceConfigurer.postProcessAfterInitialization(JacksonConversionServiceConfigurer.java:40)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)

Seems like some incorrect repos in the "pom.xml".

Next one is "mvc-showcase" and the 6.49 MB WAR now has 28 JARs as shown below:

./WEB-INF/lib/aopalliance-1.0.jar
./WEB-INF/lib/aspectjrt-1.6.10.jar
./WEB-INF/lib/commons-fileupload-1.2.2.jar
./WEB-INF/lib/commons-io-2.0.1.jar
./WEB-INF/lib/el-api-2.2.jar
./WEB-INF/lib/hibernate-validator-4.1.0.Final.jar
./WEB-INF/lib/jackson-core-asl-1.8.1.jar
./WEB-INF/lib/jackson-mapper-asl-1.8.1.jar
./WEB-INF/lib/javax.inject-1.jar
./WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
./WEB-INF/lib/jdom-1.0.jar
./WEB-INF/lib/joda-time-1.6.2.jar
./WEB-INF/lib/jstl-api-1.2.jar
./WEB-INF/lib/jstl-impl-1.2.jar
./WEB-INF/lib/log4j-1.2.16.jar
./WEB-INF/lib/rome-1.0.0.jar
./WEB-INF/lib/slf4j-api-1.6.1.jar
./WEB-INF/lib/slf4j-log4j12-1.6.1.jar
./WEB-INF/lib/spring-aop-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-asm-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-beans-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-context-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-context-support-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-core-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-expression-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-web-3.1.0.RELEASE.jar
./WEB-INF/lib/spring-webmvc-3.1.0.RELEASE.jar
./WEB-INF/lib/validation-api-1.0.0.GA.jar

The app at least deployed and showed results this time. But still no database!

Next I tried building "jpetstore" and got the error:

[ERROR] Failed to execute goal on project org.springframework.samples.jpetstore:
Could not resolve dependencies for project org.springframework.samples:
org.springframework.samples.jpetstore:war:1.0.0-SNAPSHOT: Failed to collect
dependencies for [commons-fileupload:commons-fileupload:jar:1.2.1 (compile),
org.apache.struts:com.springsource.org.apache.struts:jar:1.2.9 (compile),
javax.xml.rpc:com.springsource.javax.xml.rpc:jar:1.1.0 (compile),
org.apache.commons:com.springsource.org.apache.commons.dbcp:jar:1.2.2.osgi (compile),
commons-io:commons-io:jar:1.3.2 (compile), hsqldb:hsqldb:jar:1.8.0.7 (compile),
org.apache.tiles:tiles-core:jar:2.2.0 (compile), org.apache.tiles:tiles-jsp:jar:2.2.0 (compile),
org.tuckey:urlrewritefilter:jar:3.1.0 (compile), org.springframework:spring-webmvc:jar:
3.0.0.BUILD-SNAPSHOT (compile), org.springframework:spring-orm:jar:3.0.0.BUILD-SNAPSHOT (compile),
org.springframework:spring-context-support:jar:3.0.0.BUILD-SNAPSHOT (compile),
org.springframework.webflow:spring-js:jar:2.0.7.RELEASE (compile), org.apache.ibatis:
com.springsource.com.ibatis:jar:2.3.4.726 (runtime), com.caucho:com.springsource.com.
caucho:jar:3.2.1 (compile), org.apache.axis:com.springsource.org.apache.axis:jar:1.4.0 (compile),
javax.wsdl:com.springsource.javax.wsdl:jar:1.6.1 (compile), javax.servlet:jstl:jar:1.2 (runtime),
org.aspectj:aspectjweaver:jar:1.6.5 (compile), javax.servlet:servlet-api:jar:2.5 (provided),
javax.servlet.jsp:jsp-api:jar:2.1 (provided), junit:junit:jar:4.6 (test)]: Failed to read
artifact descriptor for org.springframework:spring-webmvc:jar:3.0.0.BUILD-SNAPSHOT: Could
not transfer artifact org.springframework:spring-webmvc:pom:3.0.0.BUILD-SNAPSHOT from/to
JBoss repository (http://repository.jboss.com/maven2): Access denied to: http://
repository.jboss.com/maven2/org/springframework/spring-webmvc/3.0.0.BUILD-SNAPSHOT/
spring-webmvc-3.0.0.BUILD-SNAPSHOT.pom
It appears the sample is broken - maybe I was pulling from the wrong repository - would be great if someone were to point me at a good target to use here.

With a 50% hit on samples in this repository, I started searching through numerous blogs, most of which have either outdated information (using XML-heavy Spring 2.5), some piece of configuration (which is a typical "feature" of Spring) is missing, or too much complexity in the sample. I finally found this blog that worked like a charm. This blog creates a trivial Spring MVC 3 application using Hibernate and MySQL. This application performs CRUD operations on a single table in a database using typical Spring technologies.  I downloaded the sample code from the blog, deployed it on GlassFish 3.1.2 and could CRUD the "person" entity. The source code for this application can be downloaded here. More details on the application statistics below.

And then I built a similar CRUD application in Java EE 6 using NetBeans wizards in a couple of minutes. The source code for the application can be downloaded here and the WAR here.

The Spring Source Tool Suite may also offer similar wizard-driven capabilities but this blog focus primarily on comparing the runtimes. The lack of STS tutorials was slightly disappointing as well. NetBeans however has tons of text-based and video tutorials and tons of material even by the community. One more bit on the download size of tools bundle ...

NetBeans 7.1.1 "All" is 211 MB (which includes GlassFish and Tomcat)
Spring Tool Suite  2.9.0 is 347 MB (~ 65% bigger)

This blog is not about the tooling comparison so back to the Java EE 6 version of the application ....

In order to run the Java EE version on GlassFish, copy the MySQL Connector/J to glassfish3/glassfish/domains/domain1/lib/ext directory and create a JDBC connection pool and JDBC resource as:
./bin/asadmin create-jdbc-connection-pool --datasourceclassname \\
com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype \\
javax.sql.DataSource --property \\
portNumber=3306:user=mysql:password=mysql:databaseName=mydatabase \\
myConnectionPool
./bin/asadmin create-jdbc-resource --connectionpoolid myConnectionPool jdbc/myDataSource

I generated WARs for the two projects and the table below highlights some differences between them:


Java EE 6
Spring
WAR File Size
0.021030 MB
10.87 MB (~516x)
Number of files
20
53 (> 2.5x)
Bundled libraries
0
36
Total size of libraries
0
12.1 MB
XML files
3
5
LoC in XML files
50 (11 + 15 + 24) 129 (27 + 46 + 16 + 11 + 19) (~ 2.5x)
Total .properties files
1
Bundle.properties
2
spring.properties, log4j.properties
Cold Deploy
5,339 ms
11,724 ms
Second Deploy
481 ms
6,261 ms
Third Deploy
528 ms
5,484 ms
Fourth Deploy
484 ms
5,576 ms
Runtime memory
~73 MB
~101 MB

Some points worth highlighting from the table ...
  • 516x WAR file, 10x deployment time - With 12.1 MB of libraries (for a very basic application) bundled in your application, the WAR file size and the deployment time will naturally go higher. The WAR file for Spring-based application is 516x bigger and the deployment time is double during the first deployment and ~ 10x during subsequent deployments. The Java EE 6 application is fully portable and will run on any Java EE 6 compliant application server.
  • 36 libraries in the WAR - There are 14 Java EE 6 compliant application servers today. Each of those servers provide all the functionality like transactions, dependency injection, security, persistence, etc typically required of an enterprise or web application. There is no need to bundle 36 libraries worth 12.1 MB for a trivial CRUD application. These 14 compliant application servers provide all the functionality baked in.

    Now you can also deploy these libraries in the container but then you don't get the "portability" offered by Spring in that case. Does your typical Spring deployment actually do that ?
  • 3x LoC in XML - The number of XML files is about 1.6x and the LoC is ~ 2.5x. So much XML seems circa 2003 when the Java language had no annotations. The XML files can be further reduced, e.g. faces-config.xml can be replaced without providing i18n, but I just want to compare stock applications.
  • Memory usage - Both the applications were deployed on default GlassFish 3.1.2 installation and any additional memory consumed as part of deployment/access was attributed to the application. This is by no means scientific but at least provides an initial ballpark. This area definitely needs more investigation.

Another table that compares typical Java EE 6 compliant application servers and the custom-stack created for a Spring application ...


Java EE 6
Spring
Web Container

53 MB (tcServer 2.6.3 Developer Edition)
Security
12 MB (Spring Security 3.1.0)
Persistence
6.3 MB (Hibernate 4.1.0, required)
Dependency Injection
5.3 MB (Framework)
Web Services
796 KB (Spring WS 2.0.4)
Messaging
3.4 MB (RabbitMQ Server 2.7.1)
936 KB (Java client 936)
OSGi
1.3 MB (Spring OSGi 1.2.1)

GlassFish and WebLogic (starting at 33 MB)
83.3 MB

There are differentiating factors on both the stacks. But most of the functionality like security, persistence, and dependency injection is baked in a Java EE 6 compliant application server but needs to be individually managed and patched for a Spring application. This very quickly leads to a "stack explosion". The Java EE 6 servers are tested extensively on a variety of platforms in different combinations whereas a Spring application developer is responsible for testing with different JDKs, Operating Systems, Versions, Patches, etc. Oracle has both the leading OSS lightweight server with GlassFish and the leading enterprise Java server with WebLogic Server, both Java EE 6 and both with lightweight deployment options.

The Web Container offered as part of a Java EE 6 application server not only deploys your enterprise Java applications but also provide operational management, diagnostics, and mission-critical capabilities required by your applications.

The Java EE 6 platform also introduced the Web Profile which is a subset of the specifications from the entire platform. It is targeted at developers of modern web applications offering a reasonably complete stack, composed of standard APIs, and is capable out-of-the-box of addressing the needs of a large class of Web applications. As your applications grow, the stack can grow to the full Java EE 6 platform. The GlassFish Server Web Profile starting at 33MB (smaller than just the non-standard tcServer) provides most of the functionality typically required by a web application. WebLogic provides battle-tested functionality for a high throughput, low latency, and enterprise grade web application. No individual managing or patching, all tested and commercially supported for you!

Note that VMWare does have a server, tcServer, but it is non-standard and not even certified to the level of the standard Web Profile most customers expect these days. Customers who choose this risk proprietary lock-in since VMWare does not seem to want to formally certify with either Java EE 6 Enterprise Platform or with Java EE 6 Web Profile but of course it would be great if they were to join the community and help their customers reduce the risk of deploying on VMWare software.

Some more points to help you decide choose between Java EE 6 and Spring ...

  • Freedom to choose container - There are 14 Java EE 6 compliant application servers today, with a variety of open source and commercial offerings. A Java EE 6 application can be deployed on any of those containers. So if you deployed your application on GlassFish today and would like to scale up with your demands then you can deploy the same application to WebLogic. And because of the portability of a Java EE 6 application, you can even take it a different vendor altogether.

    Spring requires a runtime which could be any of these app servers as well. But why use Spring when all the required functionality is already baked into the application server itself ?

    Spring also has a different definition of portability where they claim to bundle all the libraries in the WAR file and move to any application server. But we saw earlier how bloated that archive could be.

    The equivalent features in Spring runtime offerings (mainly tcServer) are not all open source, not as mature, and often require manual assembly. 
  • Vendor choice - The Java EE 6 platform is created using the Java Community Process where all the big players like Oracle, IBM, RedHat, and Apache are conritbuting to make the platform successful. Each application server provides the basic Java EE 6 platform compliance and has its own competitive offerings. This allows you to choose an application server for deploying your Java EE 6 applications. If you are not happy with the support or feature of one vendor then you can move your application to a different vendor because of the portability promise offered by the platform.

    Spring is a set of products from a single company, one price book, one support organization, one sustaining organization, one sales organization, etc. If any of those cause a customer headache, where do you go ? Java EE, backed by multiple vendors, is a safer bet for those that are risk averse.
  • Production support - With Spring, typically you need to get support from two vendors - VMWare and the container provider. With Java EE 6, all of this is typically provided by one vendor. For example, Oracle offers commercial support from systems, operating systems, JDK, application server, and applications on top of them. VMWare certainly offers complete production support but do you really want to put all your eggs in one basket ?

    Do you really use tcServer ? ;-)
  • Maintainability - With Spring, you are likely building your own distribution with multiple JAR files, integrating, patching, versioning, etc of all those components. Spring's claim is that multiple JAR files allow you to go à la carte and pick the latest versions of different components. But who is responsible for testing whether all these versions work together ?

    Yep, you got it, its YOU!
    If something does not work, who patches and maintains the JARs ? Of course, you!
    Commercial support for such a configuration ? On your own!

    The Java EE application servers manage all of this for you and provide a well-tested and commercially supported bundle.
While it is always good to realize that there is something new and improved that updates and replaces older frameworks like Spring, the good news is not only does a Java EE 6 container offer what is described here, most also will let you deploy and run your Spring applications on them while you go through an upgrade to a more modern architecture. End result, you get the best of both worlds - keeping your legacy investment but moving to a more agile, lightweight world of Java EE 6.

A message to the Spring lovers ...

The complexity in J2EE 1.2, 1.3, and 1.4 led to the genesis of Spring but that was in 2004. This is 2012 and the name has changed to "Java EE 6" :-) There are tons of improvements in the Java EE platform to make it easy-to-use and powerful. Some examples:
  • Adding @Stateless on a POJO makes it an EJB
  • EJBs can be packaged in a WAR with no special packaging or deployment descriptors
  • "web.xml" and "faces-config.xml" are optional in most of the common cases
  • Typesafe dependency injection is now part of the Java EE platform
  • Add @Path on a POJO allows you to publish it as a RESTful resource
  • EJBs can be used as backing beans for Facelets-driven JSF pages providing full MVC
  • Java EE 6 WARs are known to be kilobytes in size and deployed in milliseconds
  • Tons of other simplifications in the platform and application servers
So if you moved away from J2EE to Spring many years ago and have not looked at Java EE 6 (which has been out since Dec 2009) then you should definitely try it out. Just be at least aware of what other alternatives are available instead of restricting yourself to one stack. Here are some workshops and screencasts worth trying:
  • screencast #37 shows how to build an end-to-end application using NetBeans
  • screencast #36 builds the same application using Eclipse
  • javaee-lab-feb2012.pdf is a 3-4 hours self-paced hands-on workshop that guides you to build a comprehensive Java EE 6 application using NetBeans
Each city generally has a "spring cleanup" program every year. It allows you to clean up the mess from your house. For your software projects, you don't need to wait for an annual event, just get started and reduce the technical debt now! Move away from your legacy Spring-based applications to a lighter and more modern approach of building enterprise Java applications using Java EE 6.

Watch this beautiful presentation that explains how to migrate from Spring -> Java EE 6:



List of files in the Java EE 6 project:

./index.xhtml
./META-INF
./person
./person/Create.xhtml
./person/Edit.xhtml
./person/List.xhtml
./person/View.xhtml
./resources
./resources/css
./resources/css/jsfcrud.css
./template.xhtml
./WEB-INF
./WEB-INF/classes
./WEB-INF/classes/Bundle.properties
./WEB-INF/classes/META-INF
./WEB-INF/classes/META-INF/persistence.xml
./WEB-INF/classes/org
./WEB-INF/classes/org/javaee
./WEB-INF/classes/org/javaee/javaeemysql
./WEB-INF/classes/org/javaee/javaeemysql/AbstractFacade.class
./WEB-INF/classes/org/javaee/javaeemysql/Person.class
./WEB-INF/classes/org/javaee/javaeemysql/Person_.class
./WEB-INF/classes/org/javaee/javaeemysql/PersonController$1.class
./WEB-INF/classes/org/javaee/javaeemysql/PersonController$PersonControllerConverter.class
./WEB-INF/classes/org/javaee/javaeemysql/PersonController.class
./WEB-INF/classes/org/javaee/javaeemysql/PersonFacade.class
./WEB-INF/classes/org/javaee/javaeemysql/util
./WEB-INF/classes/org/javaee/javaeemysql/util/JsfUtil.class
./WEB-INF/classes/org/javaee/javaeemysql/util/PaginationHelper.class
./WEB-INF/faces-config.xml
./WEB-INF/web.xml

List of files in the Spring 3.x project:

./META-INF
./META-INF/MANIFEST.MF
./WEB-INF
./WEB-INF/applicationContext.xml
./WEB-INF/classes
./WEB-INF/classes/log4j.properties
./WEB-INF/classes/org./WEB-INF/classes/org/krams ./WEB-INF/classes/org/krams/tutorial ./WEB-INF/classes/org/krams/tutorial/controller ./WEB-INF/classes/org/krams/tutorial/controller/MainController.class ./WEB-INF/classes/org/krams/tutorial/domain ./WEB-INF/classes/org/krams/tutorial/domain/Person.class ./WEB-INF/classes/org/krams/tutorial/service ./WEB-INF/classes/org/krams/tutorial/service/PersonService.class ./WEB-INF/hibernate-context.xml ./WEB-INF/hibernate.cfg.xml ./WEB-INF/jsp ./WEB-INF/jsp/addedpage.jsp ./WEB-INF/jsp/addpage.jsp ./WEB-INF/jsp/deletedpage.jsp ./WEB-INF/jsp/editedpage.jsp ./WEB-INF/jsp/editpage.jsp ./WEB-INF/jsp/personspage.jsp ./WEB-INF/lib ./WEB-INF/lib/antlr-2.7.6.jar ./WEB-INF/lib/aopalliance-1.0.jar ./WEB-INF/lib/c3p0-0.9.1.2.jar ./WEB-INF/lib/cglib-nodep-2.2.jar ./WEB-INF/lib/commons-beanutils-1.8.3.jar ./WEB-INF/lib/commons-collections-3.2.1.jar ./WEB-INF/lib/commons-digester-2.1.jar ./WEB-INF/lib/commons-logging-1.1.1.jar ./WEB-INF/lib/dom4j-1.6.1.jar ./WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar ./WEB-INF/lib/hibernate-annotations-3.4.0.GA.jar ./WEB-INF/lib/hibernate-commons-annotations-3.1.0.GA.jar ./WEB-INF/lib/hibernate-core-3.3.2.GA.jar ./WEB-INF/lib/javassist-3.7.ga.jar ./WEB-INF/lib/jstl-1.1.2.jar ./WEB-INF/lib/jta-1.1.jar ./WEB-INF/lib/junit-4.8.1.jar ./WEB-INF/lib/log4j-1.2.14.jar ./WEB-INF/lib/mysql-connector-java-5.1.14.jar ./WEB-INF/lib/persistence-api-1.0.jar ./WEB-INF/lib/slf4j-api-1.6.1.jar ./WEB-INF/lib/slf4j-log4j12-1.6.1.jar ./WEB-INF/lib/spring-aop-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-asm-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-beans-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-context-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-context-support-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-core-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-expression-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-jdbc-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-orm-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-tx-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-web-3.0.5.RELEASE.jar ./WEB-INF/lib/spring-webmvc-3.0.5.RELEASE.jar ./WEB-INF/lib/standard-1.1.2.jar ./WEB-INF/lib/xml-apis-1.0.b2.jar ./WEB-INF/spring-servlet.xml ./WEB-INF/spring.properties ./WEB-INF/web.xml

So, are you excited about Java EE 6 ? Want to get started now ? Here are some resources:

Monday Dec 05, 2011

Java Geek Bike Ride, Sao Paulo - JavaOne Latin America 2011

The City of Sao Paulo marks one lane exclusively for bikers (the pedal ones ;) on Sundays and national holidays. The 45 km route through the city is served by tons of volunteers providing directions and safety with the traffic in other lanes. The lanes are well marked and is a way to make to promote healthy lifestyle in the city. The ride is mostly flat with one small hill towards the end. Check out CicloFaixa for more details.


Fabiane Nardon and gang used this opportunity to arrange a Geek Bike Ride for the local community to meet JavaOne speakers in an informal setting. Our bike angels Fabiane, Claudio, and Fernando did a fabulous job of keeping the riders together. Claudio not only completed 4000 km on his bike yesterday but is also one of the best know agile speakers in Brazil. I had the opportunity to work with Fernando on the release of the largest local guide deployment in Brazil and he is a sharp guy. And everybody knows Fabiane, a Java Champion, Duke Choice Award winner, entrepreneur, java.net Tools Community Manager, and a lot more.

There were no technology discussions, just pure fun, laughter, and a great workout!

I shared a bunch of Odwalla bars with all the bikers and they were well appreciated. Check out the picture below for the riders getting powered by an Odwalla bar before the ride:



Check out the bike route:



And some pictures ...



Check out lot more pictures at:


Thank you bike angels Fabiane, Claudio, and Fernando for guiding us through the wonderful bike ride. JavaOne San Francisco 2011 had its first community run and now this fun bike ride. Lets see where it goes next :-)

Now, JavaOne Latin America starts tomorrow. There is tons of exciting content there and looking forward to lots of nerdgasms there!

Wednesday Oct 05, 2011

JavaOne 2011 Community Run - 5.5 miles on Thursday morning

Are you interested in running together with fellow JavaOners, JavaOnees, JavaOneiks, or whatever you may call ... your fellow JavaOne conference attendees.

Tomas and I plan to run the following route through the famous Market and Embarcadero streets and the infamous hill of Lombard. The complete route is below (clickable map):

We will leave 6:02:59 am from the intersection of Taylor and O'Farrell street. And I also have some Odwalla bars to share as well before the run.

Interested ? Just show up, no need to ack!

Monday Oct 03, 2011

GlassFish Community Event and Thirsty Bear Party Pics @ JavaOne 2011

There were about 120+ attendees at the GlassFish Community Event where we provided a health report on the community, shared product roadmap, and heard some brilliant stories from Johan Vos, Stephan Janssen, Fabiane Nardon, Adam Bien, and Seam Comerford on how they are using GlassFish to block 650k spams/day at Mollom, serving 3000 requests/second at ESPN, serving 1400 concurrent connections at RBS, and enjoy that the community is serving, transparent, thoughtful, and caring. The stories were all recorded and will be shared on blogs.oracle.com/stories soon.

Here are some tweets ...

Good fun at the #GlassFish community event. Always great to be catching up with people.
So unexpectedly exciting to finally meet #Glassfish users in person after badgering them electronically for years! #JavaOne11
@project_grizzly gettin' some love in the #glassfish community event. #javaone11
First short #JavaOne11 talk: "How Parleys.com uses #Glassfish" done.
#javaone good discussion/comments about java ee in the cloud, with #glassfish in the middle,
#glassfish has moved at a fast pace in the last year, advancing one whole minor release (3.0.1 -> 3.1.1) Oracle is committed. #javaone11
That's nice, the #glassfish is and will be strong in Oracle hands, actually they said they are hiring :). Cool
The crowd is a little bit shy, whatever I'm sort of happy :) #glassfish rules !
The mingling at Glassfish unconference did not work very well but the customer stories made it be worth being there.
Just had good time on the #glassfish community event
The glassfish unconference ended with making things from lego - I will have to explain to my children why I had to fly to USA to do this!
Glassfish seems to further gain momentum. Having been absorbed into Oracle has only strengthened the product - despite initial fears. #oow11

 

Enjoy some pictures from the event ...

And then some from the Thirsty Bear Party ...

Feet hurt, but we had a great time at the #glassfish event at the Thirsty Bear.
Really enjoyed the #Glassfish party, met lots of Java community friends. And yes, James Gosling is attending Devoxx IF his wife lets him :)
The #glassfish party was nice, and it was great to be in the Thirsty Bear again finally.
#javaone11 #glassfish community day: met lots of twitter / blogging / email virtual friends in real world. Looking forward to the keynote!
Had a great time at the #Glassfish party last night
The Glassfish party was great! Looking forward to the first technical keynote now. #javaone11

And some pictures as well ...

And the evolving album for JavaOne 2011 so far:

Friday Sep 16, 2011

10 reasons to attend GlassFish Community Event and Party @ JavaOne 2011

Are you coming to JavaOne 2011 ?

If YES, have you registered for the GlassFish Community Event and Party ?

If YES, then we have some exciting stuff to share with you, stay tuned!

If NO, then "oh no, you are missing out on one of the best (if not the best ;) events at JavaOne"!

Here are 10 reasons to register for the free Community Event and Party:

  1. Meet key members of the Oracle GlassFish team including Architects, Java EE spec leads, and Product Managers in an intimate setting
  2. Hear great customer testimonials who are using GlassFish in successful production deployments today
  3. Know the latest news about how Java EE 7 is going to shape the cloud
  4. Find out product (GlassFish 3.1.2 and 4.0) features before formal start of the conference
  5. Pick topics of your interest and drive the agenda in an unconference
  6. Learn how GlassFish community is thriving under Oracle
  7. Help shape the future of GlassFish and Community
  8. Grab limited edition GlassFish t-shirt (may run out in the event ;-)
  9. And this year exclusive, participate in a fun team building game
  10. Most importantly, have lots of fun (see picture below)

Here is a collage of pictures from the previous 4 years (2010, 2009, 2008 (more), and 2007):

GlassFish community knows how to have fun :-)

Don't miss out and register for the event and party now by RSVPing here. Leave a comment on this blog if you don't want/not able to sign up at the wiki.

Looking forward to see you there!

Tuesday Jul 19, 2011

GlassFish Community Event and Party at JavaOne 2011 - Sign Up Now!


As mentioned earlier, the GlassFish Community Event and Party are planned along with JavaOne 2011. Please sign up for the community event by clicking on the image below:

GlassFish Community Event at JavaOne 2011

And the party is at The Thirsty Bear from 7:30pm - 9:30pm on the same day. Please sign up for the party by clicking on the image below:

Friends of GlassFish Party at JavaOne 2011

The above links require you to have a Facebook account. But if you do not have a Facebook credentials, or don't want to sign up, then you can also add your acknowledgement at this wiki, or leave a comment on this blog, or reach us at @glassfish.

A conference badge (either Oracle Open World or JavaOne) is required to attend the community event and the party is open to all friends of GlassFish.

I've attended the event for the past four years and it has been an extremely rewarding and fun experience. And as Johan Vos pointed out:

Glassfish community event is always one of the highlights of JavaOne. Main reason to fly in earlier.

Check out a collage of pictures from the past years:




What wait ? Several ways you can register:

Wednesday Jun 22, 2011

GlassFish Community Event and Party at JavaOne 2011 - Oct 2, 2011

As in the previous years (2010, 2009, 2008 (more), and 2007), the GlassFish community event and party are getting planned along with JavaOne 2011 as well. Here are the coordinates for the community event:

Date: Sunday, October 2nd, 2011
Time: 12:30pm - 4:30pm
Venue: Moscone West

The party will be held at the regular venue of The Thirsty Bear.

This is your chance to meet the core members of engineering, product management, executive management, and rest of the team. This is your (yet another) chance to voice your opinion and be heard. There will be community updates, customer testimonials, unconference, and fun activities too. Stay tuned for more details.

Here are some pictures from the yesteryears:

A conference badge will be required to attend the community event but the party will be open to all friends of GlassFish. So if you are in town, plan to stop by at the community event and/or the party. Stay tuned for RSVP details.

Its going to be lot of fun!

Wednesday Mar 16, 2011

QA# 11: Java EE 6: Do more with less, No effort to create enterprise application - by Marcus Kara

This Q&A session is part of the community feedback on Java EE 6. So far the highlighted benefits are:

  • QA#1 - Standards compliance, vendor independence, milliseconds and kilobyte deployment.
  • QA#2 - Higher integrated specifications, simple and annotation driven, single-classloader WARs. Next level of industry standard
  • QA#3 - Jigsaw puzzle, Modular, standard, less xml, easy, easy, have I said easy?
  • QA#4 - Developers can concentrate on business logic, JavaEE6 is providing a standard for the infrastructure.
  • QA#5 - Faster development, less frameworks, less complexity, more great code shipped.
  • QA#6: Not your fat grandfather's enterprise Java anymore, enterprise Java renaissance
  • QA#7: Scripting framework like productivity based on standards
  • QA#8: Definite excuse to avoid Spring forever
  • QA#9: XML-less, annotated POJO, light app servers, EJB-in-a-WAR
  • QA#10: Simplified Java Development, Focus on building great products
This entry comes from Marcus Kara who is 25 years old, living in The Netherlands with his wife & 1 year old daughter. Software developer for living for over 4 years. Really interested in technology in general and also did electronic engineering in the spare time, but there is a little spare time with a child.
He likes Java because its platform independent (in a "the write once, run anywhere" way and vendor independent way) and there is a real eco-system around Java. The possibilities are endless (for some people this is a reason to not choose Java :-) ). 
The WORA concept of Java really impressed him when he bought a 100 Euro NAS (Lacie NetworkStorage 2, simple ARM-based NAS) and started GlassFish v3 on it. It just runs without any hassle. He is called "idiot" for running an enterprise app server on a NAS :-).



Here is a short summary of Java EE 6 from him:

Do more with less! It's almost no effort to create an enterprise application.

Keep reading for the fun stuff ...

1. How are you using Java EE 6 today ? What limits your adoption ?

We're currently using Java EE 6 for all new Java projects. Since we have some small projects we can choose our platform every time we have a new project. I was using Java EE 5 before Java EE 6 was out. We started to create Java EE 6 applications about a year ago. First application in production is now about half-year ago. Since Java EE 6 has so many advantages over Java EE 5 we quickly adopted Java EE 6, honestly without limits.


2. What Java EE 6 technologies are you using and why ?

Currently we use the web profile for our applications, it's really lightweight (if you compared it to a full Java EE 5 app server). We're trying to get the most out of the platform, so grab the new possibilities with both hands. Since we were using Facelets also on JSF 1.2 it's no surprise that we love using JSF 2.0. The f:ajax tag really rocks and works! Also the lack of faces.xml configuration also simplified development. The new version of JPA with better cache handling also improves our application performance. The feature what I really like is definitely CDI, Injection & Validation are things we were really missing in the Java EE API.


3. What is your development and deployment environment ?

We develop our applications in Netbeans 6.9 on a local Glassfish v3.0.1 installation. The in-place deployment feature of Netbeans & Glassfish speeds up development, no need to wait a long time if you made a change in your code.

Our deployment environment currently:
Test: 1x Glassfish v3.1, 1x Glassfish v3.0.1
Production: 1x Glassfish v2.1 cluster (3 nodes), 1x Glassfish v3.0.1 server, currently planning an upgrade of our Glassfish v2.1 cluster to Glassfish v3.1.
We mainly use MySQL as our RDMS, but we also have a lot Oracle & MS SQL servers. These are mosly used for getting data.


More details on the GlassFish production deployment coming in a separate entry.

4. What previous versions of Java EE / J2EE have you used ? How has the migration to Java EE 6 benefited ?

As mentioned by question 1, we're using Java EE 5. I looked to SpringSource but a migration would take some time and I really don't like all the xml configuration of the beans in Spring (I don't know what the current status is). The migration from Java EE 5 to Java EE 6 has a lot of benefits, most important one is that the platform is much more efficient in an development way. Less hassle and do more. The API's included in Java EE 6 (almost) don't require to use other frameworks/libraries.


5. Describe the benefits of Java EE 6 to you in 120 characters.

Do more with less! It's almost no effort to create an enterprise application.


6. Advice for anybody who is looking at Java EE 6 for their next project ?

You should definitely use the CDI API. The first one I created a project on JSF2 and JPA without CDI. After Alexis Moussine-Pouchkine inspired my at the J-Fall 2010 conference I took some time to get into CDI and really loved it!


7. What new features you'd like to see in Java EE 7 ?

Built-in kind of @ViewScope (JSF2 annotation) also in CDI. Built-in SeamFaces.

Thank you Marcus for taking time to prepare the answers!

Are you developing, deploying, consulting, training, authoring books, etc in Java EE 6 and would like to express your opinion in a similar format ? Drop acomment on this blog and I'll line you up for the Q&A session :-)

The Java EE 6 hub is your key resource to learn all about the technology.

And you can always try all Java EE 6 features in GlassFish and refer to an extensive set of Java EE 6 & GlassFish demos.

Also check out our youtube channel and follow us on @glassfish.

Technorati: javaee6 community feedback markcuskara glassfish v3

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today