Tuesday Apr 16, 2013

Maven projects with GlassFish 4.0 Embedded Plugin


Some specifications related to Java EE 7 already became Final. One example is the JavaServer Faces 2.2 (JSR 344). But you don't have to wait for the release of Java EE 7 and the final version of GlassFish 4.0, which is the reference implementation, to try all the new stuff. I've blogged about Maven and its integration with GlassFish Embedded in a way where you can, with just few steps, create a Java EE 7 and then run GlassFish Embedded 4.0 without installing it.

The good thing about this setup is that you will be "ready-to-go" as soon the Final version is released. All you will need to do will be to update the dependency and the plugin version inside your POM xml file. Now stop reading and start coding: go to my blog post "GlassFish 4 beta and Maven Embedded Plugin" and get started with Java EE 7 TO-DAY!

Wednesday Apr 10, 2013

Java EE 7 Maven Archetype

For those of us doing Java EE development with Maven (which by my own account as a former consultant is pretty much all Java EE/GlassFish adopters), Archetypes can be a great productivity boost, especially while getting started. You will be pleased to know that there is already a Java EE 7 Maven Archetype out there in the https://nexus.codehaus.org/content/repositories/snapshots/ repository (courtesy of GlassFish of course).

You can use it directly from the Maven command-line like so:

mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes 

If you prefer NetBeans, you can do that too. Just define a new repository with the URL https://nexus.codehaus.org/content/repositories/snapshots/ under "Maven Repositories" on the "Services" tab. Then proceed to "New Project -> Maven -> Project from Archetype" and enter "webapp-javaee7" into the search box. Select the 0.1-SNAPSHOT and click "Finish".

Either way, once the project is generated, you can of course tweak the POM and source code to meet your needs. It should be pretty straightforward - give me a shout if you need help getting started. Happy hacking!

Tuesday Apr 09, 2013

JMS 2, Bean Validation 1.1, JBatch, JSON-P Go Final!

Java EE 7 is almost to the finish line! The first slew of Java EE 7 JSRs have successfully passed their Final Approval Ballots and are now final. JMS 2 (JSR 343), Bean Validation 1.1 (JSR 349), JBatch (JSR 352), and JSON-P (JSR 353) all passed with near unanimous support from the JCP Executive Committee. Please join me in congratulating spec leads Nigel Deakin of Oracle, Emmanuel Bernard of Red Hat, Chris Vignola of IBM, and Jitendra Kotamraju of Oracle on the fruition of all their hard, often thankless work.

We expect more Java EE 7 JSRs to follow suit shortly, so stay tuned. This is a great time to read the final specs and start experimenting with them in the GlassFish 4 builds.

Friday Apr 05, 2013

An Overview of JAX-RS 2

JAX-RS 2 is one of the most significant parts of the upcoming Java EE 7 release. In a brief article, consultant, German author and celebrated Java EE advocate Adam Bien does a great job of overviewing the major changes in JAX-RS 2. He talks about asynchronous processing, EJB/CDI integration, filters/interceptors, the configuration API, the client API and more.

If the article whets your appetite to learn more about JAX-RS 2, you could download the actual proposed final draft and give it a read. For those unaware, JAX-RS 2 recently passed its public review ballot. At just above 90 pages, the actual JAX-RS 2 specification document is not that bad of a read.

Monday Apr 01, 2013

Java EE@33rd Degree 2013

33rd Degree 2013 was held in historic Warsaw, Poland on March 13-15. For those unaware, dubbed "the Conference for Java Masters" this is the premier Java conference for Poland. It attempts to bring together elite speakers in the Java community across the globe. Some notable speakers this year included Tim Berglund, Adam Bien, Ted Neward, Dan North, Simon Ritter, Venkat Subramaniam, Geertjan Wielenga and Kai Wahner.

I delivered three full-house talks - my talk on Java EE 7 (our flagship talk), a talk on WebSocket/JSR 356 and my DDD/next-generation Java EE BluePrints talk. More details on the sessions and 33rd Degree, including the slide decks and code, posted on my personal blog.

Friday Mar 29, 2013

Java EE, Saviours and Frozen Time...

We've mentioned TomEE in the near past. Led by powerhouse developer David Blevins, it is a very exciting initiative that takes Tomcat and integrates all the necessary APIs to make it a fully certified Java EE 6 Web Profile offering. It makes Java EE a real possibility for developers focused on Tomcat.

Recently InfoWorld published an article on TomEE (to jog your memory these are the same fine folks that recently repeatedly declared Java dead because of the security vulnerability essentially limited to Applets). While most of the content of the article is very good thanks to David, some pretty curious views on Java EE got infused by the InfoWorld writer. Apparently, Java EE is frozen in time, something only people in gray cubicles care about and TomEE is Java EE's only hope for survival. It did not take very long for David to distance himself and TomEE from the article.

Some of us clearly see things a bit differently than InfoWorld (and suspect that most of you do as well). Specifically, I thought it's useful for you to consider the following few points as food for thought:

  • Pound-for-pound, the amount of innovation in Java EE and it's ecosystem rivals pretty much any other technology stack out there. Just some innovations one could mention is delivering the Java community from XML, configuration and jar hell using annotations, intelligent defaults and convention-over configuration, the radically reimagined EJB 3+ API,  Facelets, the CDI API, JAX-RS, Servlet 3, Bean Validation, the transformations in JMS 2, WebSocket and so on. There have been few significant technologies in the ecosystem that have not directly benefited from or outright adopted these changes. It's easy to see the scale of changes even from my very high level talks on Java EE 6 and Java EE 7. As a result, Java EE today is easily one of the most productive and powerful development platforms around.
  • Continued strong Java EE adoption in the community is a change that's here to stay. Even some organizations that once outright dismissed Java EE have now brought it back into their evaluation cycles. Our GlassFish stories, complete with videos are a nice concrete manifestation of this.
  • The JCP is a far different animal than what it was just a few years ago. The level of openness and ongoing reform geared towards reaching out to the average developer is patently obvious to folks like me and many others that have worked within the JCP as independents in recent years. You can see the end results in action from Arun's recent blog on JCP transparency and the adopt-a-JSR program that helps power it.
  • Java EE today is far more than just WebSphere 5 and WebLogic 9. There are options to suit any particular organization's needs such as GlassFish, JBoss, Resin and of course TomEE just to name a few. Even WebSphere and WebLogic have gone through wholesale changes thanks to modularity solutions like OSGi and  the Web Profile. The changes are not difficult to see if you look at things like the WebSphere Liberty Profile.

Perhaps my fellow Java EE/GlassFish comrade John Clingan said it best in his blog entry on the InfoWorld article - what is truly frozen in time is the idea that Java EE is the helpless damsel in distress waiting for a knight in shining armour to save her...

Thursday Mar 28, 2013

Jitendra Kotamraju on JSON-P

The 126th episode of the Java Spotlight podcast features an interview with JSON-P spec lead Jitendra Kotamrajuv. Although he generally keeps a pretty low profile, Jitendra (or Jitu as he prefers to be called) is one of the key engineers behind GlassFish. Before leading JSON-P, Jitu lead both the specification and implementation of JAX-WS 2.2. He talks with Roger Brinkley about JSON, the industry landscape, the motivation behind JSON-P, some of the API details as well as best practices.

The podcast also covers GlassFish, FishCAT, the Java EE 6 architect certification and the Java Magazine. You can listen to the full podcast here. Jitu offers interesting insights in addition to talking about of the API itself.

Tuesday Mar 26, 2013

Oracle Java EE 6 Enterprise Architect Exam Now Available

The value proposition of getting any particular technology certification is definitely not as black-and-white as it once used to be. Nonetheless for those developers trying to make the often difficult transition into the role of an effective architect, certifications can really help matters. An architect certification is not just a cheap resume builder to appeal to recruiters and hiring managers, but a great way of taking time out to really learn your stuff.

To this end, Oracle offers the Java EE 6 Enterprise Architect certification. It's perhaps the most recognized Java architecture certification out there. The exam portion of this certification has recently been released as a beta program. Because it's a beta program, it's a lot cheaper so definitely something worth looking into if you have an interest. Read more details on the Oracle certification blog.

Monday Mar 25, 2013

Getting Started with JSON-P

As the Java EE 7 release date draws closer, blogs and articles covering the new features are beginning to roll in. In a brief blog entry, Markus Eisele, a key independent member of the Java EE community talks about getting started with JSON-P. As you know, JSON-P (more accurately, the Java API for JSON Processing) is a key new API being added to Java EE 7. JSON-P is a foundational API to enable developers to parse, generate, transform and query JSON, particularly in JAX-RS and WebSocket powered next-generation HTML 5 applications. Developers can expect a higher level declarative JSON binding API (in a similar vein to JAXB vs. JAXP) with Java EE 7. For now, there are non-standard options like MOXy and Jackson. In the blog entry, Markus discusses integrating JSON-P with JAX-RS, creating JSON content and parsing JSON.

For those unaware, JSON-P is now in the proposed final draft stage. Do feel free to download the draft and take a look at it yourself.

Thursday Mar 21, 2013

Java EE@ScanDev 2013

The Scandinavian Developer Conference (aka ScanDev, aka SDC) 2013 was held in Gothenburg, Sweden on March 4-6. For those unaware, ScanDev is the premier IT conference in the Gothenburg region. It had tracks for product/team management, architecture, UI/UX, testing, data, C/C++, .NET, Java, mobile, JavaScript and PHP.

The Java EE presence was particularly strong at the conference this year. Besides me, Aslak Knutsen and Dan Allen had a talk about Arquillian, David Blevins spoke on TomEE and Kai Wahner had his excellent Java integration frameworks talk.

I delivered my talk on Java EE 7 (our flagship talk). More details on the session and ScanDev, including the slide deck, posted on my blog.

Wednesday Mar 20, 2013

A Gentle Introduction to JMS 2

My well-respected colleague and good friend Arun Gupta continues his admirable effort to provide some very early coverage of Java EE 7 features. I thought I'd highlight his blog entry on the core of the JMS 2 API written in this vein.

The primary goal of JMS 2 is to modernize the extremely widely used but very dated JMS API. The core of these changes is the aptly named simplified API founded upon injectable JMS contexts. The JMS context essentially represents the JMS API reimagined (without any feature loss) using up-to-date API design constructs like dependency injection, automatic life-cycle management, annotations, the builder pattern, unchecked exceptions and intelligent defaults.

In his blog entry, Arun does a good job of explaining the basic concepts of the JMS context. He explains through downloadable code examples sending and receiving messages in the brave new world of JMS 2. He also shows the very powerful capability of defining JMS resources inside your application through annotations. The blog entry is a great starting point for beginning to explore the changes in JMS 2.

Tuesday Mar 19, 2013

Chris Vignola on JBatch

The 124th episode of the Java Spotlight podcast features an interview with JBatch (aka Java Batch, aka Batch Applications for the Java Platform, aka JSR 352) spec lead Chris Vignola of IBM. Chris talks with Roger Brinkley about the history/motivation/value proposition of JBatch, key concepts, API details, best practices as well as the current status for the JSR. 

The podcast also covers Java SE, Java EE 7, GlassFish 4 and JavaFX. You can listen to the full podcast here. It is a fairly dense, informative interview from someone who is clearly extremely knowledgible on the batch processing domain.

Friday Mar 15, 2013

AutoCloseable JMS 2 Resources

As the Java EE 7 release date draws closer, blogs and articles covering the new features are beginning to roll in. In a brief blog entry, John Ament, a key independent member of the JMS 2 expert group talks about AutoCloseable JMS 2 Resources. This feature takes advantage of Java SE 7 try-with-resources to significantly simplify the cleanup of JMS resources such as connections, sessions, message consumers and message producers. This is particularly important in non-Java EE environments where you are not using the new JMSContext API via @Inject. The blog entry includes downloadable JMS 2 code samples. John expects to write many more blog entries covering JMS 2, so stay tuned.

For those unaware, JMS 2 is now in the proposed final draft stage. Feel free to download the draft and take a look at it yourself. There is a very handly What is new in JMS 2.0? section towards the beginning of the document.

Tuesday Mar 12, 2013

David Blevins on TomEE/Java EE Web Profile

TomEE is one of the most exciting developments in the Java EE ecosystem. For those unaware, TomEE is a very cool Apache project that starts from Tomcat and adds OpenWebBeans, OpenEJB, OpenJPA, MyFaces, Apache CXF and ActiveMQ to create a very capable, lightweight Java EE environment! TomEE is one of the greatest examples of certified Java EE Web Profile implementations. It is also a great option for Java EE developers focused on Tomcat.


David Blevins, the project lead for TomEE, recently did a pretty interesting interview with JAX Magazine. In the interview, David talked about the history/motivation/value proposition behind TomEE, the Java EE Web Profile, the relationship between CDI, EJB and Java EE, the relationship between Tomcat and TomEE as well as Java EE 7. It is definitely a worthwhile, thought-provoking read...

Monday Mar 11, 2013

An Overview of JSF 2.2

Although it is technically only a point release, JSF 2.2 actually has quite a bit of good stuff for JSF fans. In a brief article, Arjan Tijms does a great job of overviewing the big ticket items included in JSF 2.2. He talks about view actions, the Faces flow, HTML 5/pass-through attributes, the file upload component, CDI alignment and more.

If the article whets your appetite to learn more about JSF 2.2, you could download the actual public review draft and give it a read. For those unaware, JSF 2.2 recently near unanimously passed its public review ballot. Bear in mind, the primary audience for a specification document is technology experts/implementors, so this is not necessarily a read for the faint of heart :-). JSF is also one of the larger Java EE specifications - the document is 400+ pages long. However, spec lead Ed Burns did a great job of summarizing the changes towards the beginning of the document in the section titled Changes between 2.1 and 2.2.