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

Sunday Mar 13, 2011

QA# 10: Java EE 6: Simplified Java Development, Focus on building great products - by Subraya Mallya

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
This entry comes from Subraya Mallya who is a technology executive with years of enterprise software experience building products and running large product teams. Prior to his current venture, as an advisor/consultant, he has helped companies with their Cloud Computing, Software-as-a-Service and Platform-as-a-Service strategies. As a Chief Strategy Officer and VP of Product Management at Siterra he led the definition of product strategy, roadmap for a SaaS application that helped Wireless Infrastructure companies, Renewable Energy companies and Retail Chains roll out large capital asset programs.  Prior to that as a Director of Products at Oracle he led Product Development for various ERP, CRM and Supply Chain products. You can find more about him at http://www.linkedIn.com/in/subrayamallya and follow him on twitter @subrayamallya.



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

Simplified Java Development that I always hoped it would be. Now we can just focus on building great products.

Keep reading for the fun stuff ...

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

We are building a consumer app that is focused towards helping people attain better health. We are using Java EE6 for building the application, both the web application as well the mobile. For the UI we use PrimeFaces. Those guys in PrimeFaces are brilliant.


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

We are using JSF2.0, JPA 2.0, Facelets, EJB 3.1, JAX-RS, . I think for the first time Java EE has become simple and not this big bloated technology framework that needed significant work before you could start building your application. I am using EJB3.1 and JPA2.0 Full Profile.

On the JSF side we are currently using ManagedBean but work is underway to move to CDI. In fact that I don't need to manage a series of XML files with configuration information and just do the same with Annotations is such an improvement in productivity and reduction in maintenance overhead.

I am particularly impressed with the simplicity that has been delivered in EJB 3.1. We use Singleton (for metadata management), Asynchronous (for sending notification, managing activity stream, re-indexing), Timer (for schedule management, timed events). I remember building similar features and them taking months, now it is down to days. Having to just create a war file to package EJBs is so much more simpler

JPA has been great too. I was skeptical going in - thinking I might have to switch over to Hibernate later - but JPA 2.0 has been great. I have been able to model all kinds of entity-relationships and the ORM side has allowed me to do that. Something Pessimistic Locking with just one annotation is priceless. We are also impressed with the caching features which we have just started using.

JAX-RS is something we just started using for building out our services for data-interchange. Annotating EJBs and you get your services. We like it. Don't need to worry about underlying REST complexities.

Besides Java EE 6 stuff, we also use iText, Apache Commons, Velocity, Lucene. 100% java shop :) 



3. What is your development and deployment environment ?

All our development is done using NetBeans. We have been long time Netbeans user - you download it and it is ready to start - no messing around with plugins etc - one of the reasons we switched over from Eclipse - too much crapware - to use a PC Vendor term.
Just a recent development, we moved all our desktops from Windows to Ubuntu and we have seen CONSIDERABLE difference in speed and resource consumption of NetBeans, with the same hardware configuration. I highly recommend people move to Ubuntu if you are a NetBeans user - atleast have a dual boot and use Ubuntu.

On the Appserver side - again, I started off skeptical about GlassFish. We thought we will have to transition to the good 'ol Tomcat or JBoss. But I have to say, we have never spent time thinking about that since we started. GlassFish v3 has been good to us. Hopefully we keep getting upto date AMIs of GlassFish going forward.

On the database front, we have PostgreSQL and MongoDB. Our plans are to eventually completely move to MongoDB. We are currently figuring out how to make this indirection at the Persistence and Entity Manager layer. We are using Morphia to integrate MongoDB in.



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

Almost all the versions from the time Java was introduced.


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

Simplified Java Development that I always hoped it would be. Now we can just focus on building great products.


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

If you are a Java shop and have been frustrated with complexity in Java in the past, your pain has been relieved. You can get the same productivity that a RubyOnRails environment provides and with some upfront planning you can get dramatic productivity gains compared to past Java EE environments.


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

Having a hybrid database environment - RDBMS and NOSQL is reality. At this time we are working on PostgreSQL and MongoDB and working out those issues. I hope JPA gets aware of these environment and allows the indirection at the Entity Manager and Persistence Layer.

JPA is still does not have feature parity with Hibernate. Things like @Filter on the Entity is missing. It is a common scenario to have @OneToMany relation (say Department to Employee) where you want the traverse the relationship and fetch only the active employees.

Something like
@OneToMany(cascade = CascadeType.ALL, mappedBy = "dept")
@OrderBy("employeeName ASC")
@FilterBy("employeeStatus='A'")
private List<Employee> employeeList;

Another thing I would love Java EE folks to handle, especially in Web profile, is to include things like MINIFY, CSS/JS compression tools that are publicly available. These things should be part of the build. As a company developing a web product, it does not make sense for every company to solve these problems. Atleast should be a configuration in the Project properties.

Another tool I would love to be included (granted not Java related but needed by every Java development team) is ability to build a image sprite.

Thank you Subraya 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 subrayamallya glassfish v3

Tuesday Mar 01, 2011

QA#9: Java EE 6: XML-less, annotated POJO, light app servers, EJB-in-a-WAR - by Yakov Fain

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
This entry comes from Yakov Fain who works as Managing Director at Farata Systems, a company that provides consulting services in the field of development of enterprise rich Internet applications. He authored several technical books, and dozens of articles on software development.  Sun Microsystems has nominated and awarded Mr. Fain with the title of Java Champion. He leads the Princeton Java Users Group. His newest book "Java Programming. 24-hour Trainer" tutorial has been published by Wiley in February of 2011.



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

Java EE 6 is XML-less, everything is an annotated POJO, almost no required interfaces, app servers are light, can deploy EJB in a WAR.

Keep reading for the fun stuff ...

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

I’m using Java EE 6 since Summer of 2010. I work for Farata Systems, where we develop Rich Internet Applications (RIA), where all server side code is written in Java EE. In the past, we’d often limit the use of the platform by picking a servlet container plus some third-party frameworks. But now we can use the Web profile subset of Java EE 6. 

The reputation of the older versions of J2EE has been damaged by over-engineered EJBs, tons of XML, and complicated deployment  process. Things dramatically changed now, and several major application servers already support (fully or partially) Java EE specs.  GlassFish evangelists do an excellent job in getting the word out about the latest features of GlassFish. It would be nice to see more materials showing the latest JBoss, WebLogic, and WebSphere developments in the Java EE 6 area.



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

I like the latest servlets for not being thread-hungry, the JMS API for being simple and asynchronous, and EJB 3.1 – for being no-xml-annotated-POJOs-in-a-war.  I like the ease of creating a singleton bean that can be started on the server startup and schedule a process, say to push the price quotes into some message queue without the need to configure a cron job. 


3. What is your development and deployment environment ?

Typically, we develop the front-end of RIA using Adobe Flex. Usually we work in Eclipse for Java EE IDE with installed Flash Builder plugin. We start the servlet container or application server - Tomcat, Jetty, or GlassFish 3 -  right from the IDE. (there is an Eclipse plugin for GlassFish too). We’ve also created and open sourced a tool called Clear Toolkit that uses annotated Java and XSLT to generate a complete CRUD application (integrated with Spring and Hibernate) in minutes. The build script generates a WAR file that can be deployed in any Java EE servlet container.


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

I’ve been using J2EE since the year 2000. Back then I’ve been working on equity trading platform for a major brokerage house. The system has been based on EJB and JMS.  After that, I’ve completed a number of projects where EJB’s were out of the picture - they required heavy application containers and writing too much of the boilerplate code. The situation has changed dramatically with the release of Java EE 6.  The session bean EJB 3.1 is one class - a POJO that doesn’t even require any XML configuration.  Entity beans are gone – just use the JPA 2.0 API for persistence.


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

Java EE 6 is XML-less, everything is an annotated POJO, almost no required interfaces, app servers are light, can deploy EJB in a WAR.


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

During the last years the words Tomcat and “light-weight container” were casually used together. Think out of the box. Give GlassFish 3 a try and you may be pleasantly surprised. The Eclipse/GlassFish combination is a very easily configured development environment. GlassFish starts faster than Tomcat, it has good Web-based admin tool, no need to install additional software (e.g. JOLT) to support transactions. I remember going through the pain of configuring Apache Tomcat with another open source message-oriented middleware, while GlassFish comes integrated with OpenMQ and mapping JMS and MOM queues is really easy via GlassFish admin console. Overall working GlassFish 3 just feels better than Tomcat 6, which was not the case when I tried using GlassFish 2 a couple of years ago.


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

I don't have problems with the server side APIs, but I’d like the Java EE 7 to standardize on the deployment of the client portion of the Java code that has to communicate with the server. For example, recently I wrote a Java applet that had to use JNDI to locate some server-side objects deployed in GlassFish 3.  Such a simple task brought me to a dead end as there is no standard and light-weight set of classes to be packaged with an applet that would allow me to create a Java client that uses JNDI.

Several people suggested me to use REST instead of JNDI. But why? Is JNDI API a candidate for pruning?  In general, I’d like the future versions of Java EE to remember that there can be a Java client running remotely, which has to be light-weight and be able to communicate with server-side containers via fast communication protocols. 

To summarize this Q&A, I do encourage enterprise architects – people who set the trends – to take a closer look at Java EE 6 and speed up its adoption in your organization.

Thank you Yakov 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 yakovfain glassfish v3

Tuesday Feb 22, 2011

QA#8: Java EE 6: Definite excuse to avoid Spring forever - by Bert Ertman

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
This entry comes from Bert Ertman who is a Technology Manager for Info Support BV in the Netherlands. Bert started working with Java since the very first public release in 1995 and has done so ever since. In 2008 Bert was honored by receving the coveted recognition of ‘Java Champion’.

He is well known within the Dutch Java community, not only for his role as a co-lead of NLJUG , but also because he is still doing talks and workshops advocating new technologies. As JUG leader, Bert helped the NLJUG in scaling their events (J-Spring / J-Fall) from 150 attendees up to over 1,000 attendees at the most recent events.



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

Your definite excuse to avoid Spring forever. Finally! ;-)

Keep reading for the fun stuff ...

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

As a self proclaimed technology evangelist and as a Java Champion I’m using Java EE 6 technology for presentations, lectures and training both for in-house training of colleagues, customers, university students and Java User Group members.

Unfortunately, up until recently, lack of commercially available mainstream application servers limits adoption at many customers that demand only proven technology. With the currently available implementations and upcoming releases this will hopefully be history soon. IDE support can be better as well and is sometimes an (valid) argument that keeps developers from adopting great technology.



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

EJB, JAX-RS, CDI, and JSF are amongst my favorite Java EE 6 technologies. They are especially powerful when used together. In collaboration with my colleague Paul Bakker we recently developed a Call for Papers and Reviewing application for NLJUG on top of Google App Engine using a nice a la carte combination of Java EE 6 technology in conjunction with some other stuff.


3. What is your development and deployment environment ?


When coding I’m mostly using Eclipse with a lot of (custom) plugins. This is part of the Software Development Factory – Endeavour - that we use in our company. Our target environment is a variety of application servers that are being used by our customers: JBoss, WebSphere, and WebLogic. Over the past one and a half year that we have been doing lectures and courses we have been mostly relying on GlassFish.


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

I have been with each and every version of enterprise Java since 1999. While Java EE 5 was a great leap forward for productivity and ease of use, the true power of modern Java EE was unleashed with the advent of CDI and updates of powerful frameworks as EJB 3.1 and JPA 2.0. Getting rid of XML and deployment descriptors in exchange for annotations has been part of the big leap forward. Another factor that should not be ruled out is that since J2EE 1.4 expert groups have finally been listening to the voices of real developers instead of crafting up academic specs in ivory towers.


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

Your definite excuse to avoid Spring forever. Finally! ;-)


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

Don’t be fooled by enterprise Java critics from back in the 2004 days. Enterprise Java has come a long way ever since and should be your standard option when considering large scale enterprise Java development when dealing with serious functional and non-functional requirements. Although the latest versions of Java EE are all about ease-of-use and ease-of-development this doesn’t mean that you have to be ignorant or unaware of the complexity that is involved under the hood. Enterprise development is a profession and for those that are skilled Java EE (6) is a joy to work with.


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

Aiming for the obvious here: Java EE 7 should be about enabling enterprise Java for cloud based stacks. There can also be much benefit from new features in Java SE 7 and 8. A lot of the convenience stuff that is in frameworks like Seam and Arquillian should make it into the specs as well.


Thank you Bert 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 bertertman glassfish v3

Thursday Feb 17, 2011

QA#7: Java EE 6: Scripting framework like productivity based on standards - by Paul Bakker

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
This entry comes from Paul Bakker who is is a is a trainer at Info Support in the Netherlands. He teaches about a wide range of Java related topics including Java EE, Seam, Spring and Groovy & Grails. He's a regular speaker for the NLJUG and a Java Magazine author.



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

Scripting framework like productivity while still keeping all enterprise characteristics and based on standards.

Keep reading for the fun stuff ...

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

I’m a trainer at Info Support which means most of my days I’m training developers and architects in using certain technology and frameworks. Our Java EE 6 course is getting very popular in the last few months now that the application server support is getting better. Application server support is also the reason that adoption is still slow. Of course the support in both Glassfish v3 and JBoss AS 6 is excellent, but most of our customers in the Netherlands are using either WebSphere or WebLogic. The problem is not only the fact that WebSphere and WebLogic only have partial Java EE 6 support, but also that most (large) customers don’t upgrade to new versions easily. This is more of a licensing problem than a technical problem in most cases. It’s too bad this holds back adoption but there’s not much we can do about it from a specification perspective.

Something that I noticed is that application server vendors are adding Java EE 6 support spec by spec. For example WebLogic supports JPA 2 and JSF 2, but no CDI and EJB 3.1 yet. To me this raises the question if an umbrella Java EE spec is still useful. Isn’t it enough to have specifications for all different APIs and technologies we use? Different specs evolve at different speeds, and it would be great if application server vendors would make it easier to upgrade to newer versions of independent specs.



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

Currently in both my training and projects I’m using: CDI, JPA 2.0, EJB 3.1, JSF 2.0 and JAX-RS. All specs are useful on their own, but only when used together it dramatically simplifies the programming model. In my opinion CDI is the main reason for the greatly enhanced programming model. The other specs have some very useful new features, but none of them are game changing. CDI completely changes the programming model however. Even more important is the fact that CDI makes it possible to extend the platform in a very transparent way. The JBoss folks did an excellent job at the Weld implementation and are now extending the platform in the Seam 3 project. The beauty of Seam 3 is that it adds important features to the platform, while still keeping the same programming model. If features invented in Seam 3 will be standardized in the future it will be much easier to migrate applications to using the standards again.

The other specs are great additions too however. It’s more realistic now to build applications with just Java EE 6, without using any other frameworks. Take EJB 3.1 improved timers as an example; in the past you would need a framework such as Quartz to do scheduling because EJB timers where too limited. With EJB 3.1 you probably won’t need Quartz any more. It’s not that I’m against frameworks in general. The problem with using many frameworks is that it gets harder for new developers on your team to understand what’s going on. Standardization is key to maximize reuse of knowledge, that’s why specs are important. The same is true for web frameworks. There are so many great frameworks out there all having their strengths, but it’s hard to know them all. I’m happy to see that JSF 2.0, combined with CDI, has evolved to one of the most productive web frameworks. It’s flexible enough to support multiple styles of web development (stateful vs stateless).



3. What is your development and deployment environment ?

Because I work with many different customers I work with different deployment environments too. From full blown WebSphere / WebLogic / JBoss stacks to lightweight environments such as Tomcat and Google AppEngine. This persists to be an issue for Java EE 6 adoption. Most developers are easily convinced to use Java EE 6, but are not able to do so because the application servers are not upgraded yet.

My IDE of choice is Intellij. The most important reason for this is the excellent Java EE 6 support. Luckily the IDE support for Maven has been improved a lot in the past year so it get’s very easy to switch IDEs on a project. Eclipse still doesn’t have CDI support which breaks JSF expression language support too which makes the Java EE 6 support very weak.



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

I started using J2EE in the EJB 2.x era. There were two problems with this technology which are well known; the huge amount of boilerplate code and configuration, and the fact that a bunch of other frameworks were required to do any form of decent development. Java EE 5 improved the programming model a lot but was still incomplete. Incomplete because there where holes in the specs (JSF 1.2 most notably) so you would still need additional frameworks. Even more important was the lack of a real dependency injection solution. We had the @EJB and @Resource annotations but those are limited to EJBs which is too limited. Because of those limitations I never really felt very productive when using the J2EE or Java EE 5 stack compared to frameworks such as Spring. Not to even mention Grails...

With Java EE 6 however I notice that productivity has improved to levels where only scripting frameworks such as Grails could reach before. At this moment I would even prefer to use a full Java EE 6 Web Profile stack over Spring/Grails just looking at development experience. And with that, we are still based on standardized technology without any vendor lock-in. The only problem, once again, is that the latest Spring version can be used on any Servlet container, while our Java EE 6 apps only runs on a handful of servers at this moment which.



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

Scripting framework like productivity while still keeping all enterprise characteristics and based on standards.


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

Start by looking at CDI. For some reason CDI is not mentioned in a few of the important Java EE 6 related books and blog posts. This is a shame because CDI is the most game changing spec in Java EE 6. Besides that, take a look at the Arquillian testing framework. This gives the ability to run in-container automated integration tests fast and easily for your Java EE 6 code. This was one of the very hard to do things in the Java EE world before.


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

Most importantly I hope to be able to evolve the Java EE world more rapidly. Releasing separate specs whenever they are ready would give this possibility. If application server vendors pick up those releases and implement them in fix packs we won’t have the problem of slow adoption after the next release. For features I’m hoping on the following:

Pretty much everything in Seam 3

\* Lots of JSF improvements
\* A better security framework (JAAS is too low level). We need something like Spring Security in the standards.
\* Easier internationalization in all parts of an application
\* Easier JMS usage


An API for non-relational databases
Specially when deploying in the cloud non-relational databases get more and more important. JPA isn’t a great fit for using those databases, so we should either create a new specification for this or adapt the JPA spec for it.

AMPQ support
AMPQ seems to become an attractive alternative to JMS because it’s less Java centric. Standardized support would be most useful if AMPQ becomes more popular.

Standardized caching
Most specially in cloud environments caching is very important. The EJB spec could for example be improved by adding a method level @Cachable annotation that allows the container to cache the data returned by a method.

Clean up the programming model
Due to history and politics there are some really strange things in the Java EE 6 programming model. The fact that JSF 2.0 has it’s own @ManagedBean annotation for example is just plainly confusing to people who get started with Java EE 6. The @EJB annotation is more or less obsolete too when using CDI’s @Inject. The same is true for the overlap between Servlet 3.0 and JAX-RS. We should get rid of those duplicate solutions and go for a more straight forward programming model.

Improve the Web Profile specification
There seems to be some missing things in the Web Profile specification that each vendor now adds anyway. Most notably are JAX-RS, EJB 3.1 timers and JMS support. I don’t really see any reason why those are not in the Web Profile, but they all make sense for moderns web/enterprise applications. To my opinion the Web Profile should contain everything to do modern application development without the burden of backwards compatibility.

A RESTful web service client framework
JAX-RS is now only about implementing the server side of services, but what about the consumer side? There is some nice support in RESTEasy already, and there should be something like that in the standard. I believe the JAX-RS guys are already working on this :-)

Flawless Maven support
Although Maven has it’s flaws it should be the standard way of building applications to get automated builds and multi-IDE support. It’s far from trivial to get a Java EE 6 Maven build working however, specially when using unit and integration tests. This is the way people build applications, so there shouldn’t be any difficulties in this area.

Integration testing
In container integration testing should be a standard feature but is now hard to do (in the best case). Something like Arquillian should be standard available, with a standardized API to create partial deployments and running tests. While Arquillian is now based on a per-container solution to run tests this could become a lot easier if containers are required to support this.

WebSocket support
Each application server should support HTML 5 WebSockets in a standardized way.

Lambda based Criteria API
The Criteria API in JPA 2.0 is nice, but very verbose too. When looking at .NET there’s LINQ, which is basically language support for a Criteria API. That would simplify things a lot, but we’ll at least need Java 8 for this.

Thank you Paul 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 paulbakker glassfish v3


Thursday Feb 10, 2011

QA#6: Java EE 6: Not your fat grandfather's enterprise Java anymore, enterprise Java renaissance - by Julien Ponge

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.
This entry comes from Julien Ponge who is is a long-time opensource craftsman. He created the IzPack installer framework and has participated in several other projects, including the GlassFish application server in cooperation with Sun Microsystems. Holding a PhD in computer science from UNSW Sydney and UBP Clermont-Ferrand, he is currently an associate professor in computer science at INSA de Lyon and a researcher as part of the Amazones INRIA group. Speaking both industrial and academic languages, he is highly motivated in further developing synergies between those worlds.


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

Java EE 6 is not your fat grandfather's enterprise Java anymore.

And more details follow ...


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

I am using Java EE 6 on several fronts. As an Associate Professor in one of the top french engineering school (http://telecom.insa-lyon.fr/), I teach middlewares. We do not teach Java EE technology per-se, as understanding why distributed / enterprise computing is hard is of higher importance, but the practical side of our teaching involves developing with Java EE, so it's fair to say that our students become proficient with the essentials of the technology.

Apart from that I use Java EE 6 for internal and research projects. In the first case, it serves as a solid, standards-based framework for building small applications that we need. In the later case, Java EE 6 is not where the focus is, but it provides a solid foundation for building the server-side counterpart in a few xperimental settings where we have mobile / ambient devices.

I am clearly lucky to be in a setting where the latest and greatest in technology can be used, so no infrastructure and/or skill issues hinder Java EE 6 adoption. But I reckon that adopting Java EE 6 requires longer cycles in larger organizations.



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

I mostly use EJBs 3.1, CDI, JMS, Servlets, JPA and JAX-RS.

EJBs 3.1 are a truly solid foundation for business components, especially as they are transacted by default. Applying security constraints is easy, and you can still easily inject further cross-cutting concerns code. What's more, they can easily be exposed as web services and reused in web parts.

CDI covers most of the needs for dependency injection frameworks while remaining very easy to grasp. The default scopes that you get with Java EE 6
applications (application, request, session, ...) not only force you to think properly in terms of objects lifespan: you also get to write much less code! I recently wrote an small app where stateful EJBs where session-scoped, which eliminated the need for dealing with HTTP session code. Code being absorbed by a framework is always a big win.

JPA is now a mature object-relational mapping foundation, while Servlets gained 2 useful features: @WebServlet and the possibility to (finally) handle multipart HTTP POST requests in a reasonable way. No more commons-fileupload :-)

Finally, JAX-RS allows for rapidly building REST-based interfaces that seamlessly handle multiple resource representation formats such as JSON and XML. This is important, as a growing number of applications blend URLs for web and remote applications. This is also important for monitoring purposes too, with a good example being the GlassFish administration console which is RESTful.



3. What is your development and deployment environment ?

I use Glassfish v3 and Maven.

When I teach, we force our students to work in the console for building and doing most deployment tasks. We also require them to use a text editor (VIM, no troll please). IDEs are great when you have some experience, but I realized that they add too much complexity and overhead on their own when you are a starter. It is good to be "close" to the code when you learn a technology.

This is also possible with Java EE 6 being so lean/minimalistic in terms of code one has to write. You don't have to deal with configuration matters in
most cases. Coupled with Maven and Glassfish, one is no less productive than with other technologies that are said to be... well... "lightweight".

Otherwise I use IntelliJ IDEA, as it's my IDE of choice. I also happen to try Netbeans from time to time, and it is clearly as good as IDEA for any Java development. The only IDE I would recommend against is Eclipse, provided you have a choice of course.

Finally, we don't have a vast amount of data to handle, so Java DB / MySQL are just fine, although I have a clear preference for PostgreSQL in production settings whenever I can use it. PostgreSQL is rock-solid.



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

I've never liked J2EE 1.x. For me, this was the typical "design by committee" mistake. I really started to use Java EE full stack when version 5 was released, as it clearly marked the standard enterprise Java renaissance. The migration to Java EE 6 is just a natural evolution from Java EE 5, with lots of added benefits such as @WebServlet and the ability to blend EJBs and web applications into WAR archives. This clearly simplifies the packaging and deployment of Java EE applications.

Before that, I had used what I would call "plain webapps", i.e., Java applications based on Servlets but with no EJB container (think Tomcat). I also sparingly
used Spring, but with the advent of Java EE 5+, there are less compelling reasons to use it. If you have a strong Spring experience in your teams then you can happily stick with it. You may still give Java EE 6 a shot, as it is now much more lightweight than Spring. Essentially, you don't have to spend any quality time choosing which pieces of a middleware stack you need to configure and assemble. With Java EE 6, it's just here and ready to go. This also yields small artifacts to deploy, often weighing less than a megabyte, as you typically have few dependencies. This is more than an convenience: it also saves a lot of memory and classloader overhead.



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

Java EE 6 is not your fat grandfather's enterprise Java anymore.


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

Do not scream every time you realize that a given feature is a breeze in Java EE 6 compared to the frameworks you were used to. They still helped you before, so please show a little bit of respect ;-)


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

Allow CDI injection of remote EJB references, and deprecate the use of Java EE 5 injection annotations (@EJB, @Resource).

Remove the need for empty beans.xml just to activate CDI. Make it the default for containers, and have it turned off on the server configuration side.

Push JAX-RS foremost for web development, by making it the first choice not only for web services, but also for dealing with HTML / web browsers.

I have never really been a fan of stateful components a-la JSF for web development, so I would love to see some efforts to have a template engine in the same spirit as what we have with Grails / Play! Framework / RestHub.

There is clearly a big push toward cloud computing in our industry. I see 3 priorities here:

\* having a cache API, which is clearly lacking in Java EE at the moment, and
\* a standard API for NoSQL-store (like we have JDBC), and
\* a standard API for Object-NoSQL mapping (like we have JPA).

That is a push towards large-scale systems, but I would also love to see a push toward smaller systems, perhaps in Java EE 8. A significant part of my research activities are middlewares on "constrained devices", which include gateways and similar devices where applications and services are deployed. This is in the trend of the so-called Internet of Things. Such devices are even more and more providing an HTTP console for remote management, monitoring and administration, and their hardware allow specific Java virtual machines to run. Perhaps a "constrained devices" Java EE profile could be elaborated for such devices? Java EE should really play a big role here I think. The research team that I am part of (INRIA Amazones) could certainly help the Java community in standardization efforts if such profile would be of interest.

Thank you Julien 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 julienponge glassfish v3

Tuesday Feb 08, 2011

QA#5: Java EE 6: Faster development, less frameworks + complexity, more great code - by Juliano Viana

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.
This entry comes from Juliano Viana who is a Java EE and Software Architecture consultant based on Belo Horizonte, Brazil. He started working with Java in 1997 and over the years has worked on different capacities in Mobile, Embedded and Enterprise Java projects. He is currently CTO and co-founder of Logicstyle, an agile Software Architecture consultancy, and also of Expert-in-Tech, an online consultancy group.

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

Faster development, less frameworks, less complexity, more great code shipped.

Read on for other fun stuff ...

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

We use Java EE 6 both internally and also in customer deployments. When we started developing our new online consulting service (www.expert-in-tech.com) we wanted to get more productive than in our previous projects. We usually would go for Spring+Tomcat as the basis for the architecture, but decided to give Java EE 6 a try (it was still new at the time) and immediately fell in love with it.

We started to develop Expert-in-tech on February 2010, and completed it by August 2010.  After very little development time we realized the platform was stable enough that we could start using it on customer projects as well. So we successfully adopted it on a complex customer project (see http://blogs.oracle.com/stories/resource/EGESA/EGESA-GlassFish-Questionnaire.html ) with very successful results.



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

We use EJB 3.1 in order to manage transactions, and some new features are particularly useful:

  • Interface-less session beans enable us to reduce the code base footprint.
  • The new @Schedule annotation enable us to do batch processing without the need for third-party frameworks like Quartz.
  • Asynchronous methods enable us to execute long-running actions in background, improving the user experience.
CDI also plays a big part in our architecture. We use it not only to inject code but also to inject configuration into our application components (see http://weblogs.java.net/blog/jjviana/archive/2010/05/18/applicaction-configuration-java-ee-6-using-cdi-simple-example). CDI simplifies EJB 3.1 by removing the need for boilerplate JNDI code. It also interfaces well with third-party technologies such as Apache Wicket, which we use for the presentation layer.

JPA 2.0 is also a big improvement, we particularly enjoy the support for criteria queries. EclipseLink (the reference implementation) has proved to be very stable and produce clear and descriptive error messages when there is any trouble.



3. What is your development and deployment environment ?

We develop our Java EE 6 projects in Netbeans 6.9 and Glassfish 3.0.1.  We use vanilla Java EE 6 plus Apache Wicket for the presentation layer.
Our system stores its data on PostgreSQL 8.3.



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

We have been using Java EE since J2EE 1.2, so the relationship goes a long way. Since Java EE 5 the productivity of the platform improved a lot, but Java EE 6 really brings enterprise Java development to a whole new perspective. The benefits are many:
  • Much faster development time due to simplified apis.
  • Faster server startup and application deployment times.
  • Less boilerplate code, letting developers concentrate on the business needs.


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

Faster development, less frameworks, less complexity, more great code shipped.


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

If you haven't used Java EE for a while (since J2EE 1.4), forget everything you thought you knew - Java EE 6 is a much improved platform. If you have been using "lightweight" containers (Spring+Tomcat for example) you will feel just at home, with the advantagesof  having almost no XML configuration in your projects and of being using a standard platform.


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

I would like to see better support for EE applications as first-class citizens in the Java Virtual Machine (see http://weblogs.java.net/blog/jjviana/archive/2010/08/16/my-top-wish-java-8-ee-applications-first-class-citizens). Java EE is difficult to host today in a multi-tenant environment because applications are not fully isolated from each other. And I believe multi-tenancy is the direction the Cloud is moving into.

Thank you Juliano for taking time to prepare the answers!

Are you developing, deploying, consulting, training, authoring books, etc in Java EE 6 ? Drop a comment 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.

Technorati: javaee6 community feedback julianoviana glassfish v3

Wednesday Jul 28, 2010

QA#4: Java EE 6: Developers focus on business logic, Much lower TCO - by Johan Vos

Jigsaw puzzle, modular, standard, integrated specifications, simple, annotation-driven, standards compliance, vendor independence, and light-weight deployment are some of the benefits highlighted by the Java EE 6 community.

In the Java EE 6 Feedback from Community series you can learn about how Java EE 6 is currently being used in production, development and deployment environments used within the community, and even feature requests for Java EE 7.

This entry comes from Johan Vos who started to work with Java in 1995. He worked on the Java Linux port with the Blackdown team. He has been doing Java consulting and development for a number of customers in completely different areas. Over the years, he has been active in a number of Java-based community projects, e.g. OSGi, the Glassfish project and JFXtras.org. With LodgON, the company he co-founded, he is mainly working on Java solutions for social networking software. Since he can't make a choice between embedded development and enterprise development, his main focus is on end-to-end Java, combining the strengths of back-end systems and embedded devices. His favorite technologies are currently Java EE / Glassfish at the backend and JavaFX at the frond-end.

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

Developers can concentrate on business logic, Java EE 6 is providing a standard for the infrastructure

Read on for other fun stuff ...

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

I'm using Java EE 6 in most of the Enterprise projects I'm doing. This is not a requirement, but it turns out that when talking to people about what they really want, the Java EE 6 platform provides lots of the components that are needed to create an end-to-end solution.

Java EE 6 has evolved since the announcement of J2EE. It became more usable, and easier to develop and configure. In the past, a large number of non-standard libraries and frameworks have been developed since J2EE was too complex for most simple problems. The Java EE expert group clearly has learned from these evolutions, and the current Java EE 6 spec provides the functionality that is available in those frameworks, but as a standard. This is a huge benefit.


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

I often use JPA. In earlier versions of the Java Enterprise standard, it was very hard to use the persistence layer in order to connect to a database. It was often easier to write your own connection pooling system, and perform SQL queries. But with JPA 2.0, it became much easier to manage the persistence.

I'm using (stateless) Session Beans as well, including the new Singleton Bean, combined with the @Startup annotation. The latter makes it much easier to perform tasks that need to be done only once.

I'm also using JAX-RS and Jersey frequently. In particular, I use Jersey for the communication with clients based on XML. The Transaction API is also something that I often use, either explicitly or implicitly.

3. What is your development and deployment environment ?

I'm mainly using NetBeans 6.9 on Linux. I download the full version of NetBeans, since I need both Java EE as well as JavaFX. NetBeans 6.9 comes pre-installed with Glassfish 3.0.1, so there is no need to download a whole application server to start Java EE 6 development.


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

I've been working with Java EE since version J2EE 1.2. I have always avoided to migrate projects from older to newer versions, but I always start new projects on the latest released version. Early version of J2EE required more implementation-specific XML configuration (remember the sun-cmp-mappings.xml), and once you've done this you don't want to change this. Once projects are in deployment, you cannot easily change the runtime procedures.

Operations are often carried out by a different group than the development team. New versions of the J2EE/Java EE standard require changes in development but also in operations.

One of the benefits of Java EE 6, however, is that it also simplify the packaging and deployment procedures. Using annotations in JAX-RS and Servlets, for example, eliminates the need of XML-based configuration files. And often these configuration files make the handover from development to production deployment difficult. Clearly, the TCO for an average Enterprise project can be much lower when using Java EE6.

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

Developers can concentrate on business logic, JavaEE6 is providing a standard for the infrastructure.


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

Use what you need. Nothing less, and nothing more. Although much easier than 10 years ago, Java Enterprise development can be complex. There are 2 situations you have to avoid:

  1. Sometimes, developers don't know about the infrastructure already provided by the Java EE platform, and they are duplicating functionality in their own code. If you look at the JPA and the JTA for example, that provides functionality that is needed in most projects.
  2. In a number of other cases, I see developers using features that are available in the appserver, but that are not needed in their application. The Java EE 6 spec is a composition of a number of specifications, and you don't have to use all the sub-specs.

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

Java EE 6 brought simplicity in complex enterprise applications, and made a significant move towards web-based projects. Indeed, the Java EE 6 specification is rather focused on the Web. While there are many usecases and real-world scenarios that have the Web as the most important client, I think there should be more attention for other clients, i.e. PDA, mobile phone, TV, JavaCard. Easy integration capabilities between those low-resource devices and high-end backend system will drive the adoption of Java EE.

From another point of view, more integration with the environment would be useful. For example, in a number of cases I would like to execute a specific EJB-call once CPU load is below 50%, or once disk usage is too high. I understand this is rather difficult to standardize in a non-platform dependent way.

Thanks you Johan for taking time to prepare the answers!

Are you using, consulting, training, authoring books, etc in Java EE 6 ? Drop a comment 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. Here is an extensive of Java EE 6 & GlassFish demos is available.

Technorati: javaee6 community feedback johanvos glassfish v3

Tuesday Jul 06, 2010

QA#3: Java EE 6: Jigsaw puzzle, Modular, standard, less xml, easy, easy - by Antonio Goncalves

This blog entry is third (previous ones) in the Java EE 6 feedback from the community series. You can learn about how Java EE 6 is currently being used in production, development and deployment environments used within the community, and even feature requests for Java EE 7.

This entry comes from Antonio Goncalves - a senior software architect specialized in Java / Java EE working as a consultant. He started working with Java in 1998 and quickly with J2EE in 1999. He published a first book (in French) about Java EE 5 in 2007 and became a JCP Expert Member of various JSRs in 2008 (Java EE 6, JPA 2.0 and EJB 3.1). He is a member of the OSSGTP (Open Source Solution Get Together Paris), co-leader of the Paris JUG and has been awarded Java Champion. Follow him on Twitter (http://twitter.com/agoncal) and read his blog (http://agoncal.wordpress.com/).


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

Jigsaw puzzle, Modular, standard, less xml, easy, easy, have I said easy?


Read on for other fun stuff ...


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

The first use case of using with Java EE 6 is to develop anything I need to develop, any prototype.

  • Need to write a quick task processing a database? Java EE 6.
  • Need to develop a quick admin site with a few pages interacting with an LDAP directory? Java EE 6.
  • Need to expose a RESTful web service? Java EE 6.

The platform became so integrated, as well as being so modular, and so simple to use, that any simple use case is a perfect excuse to use Java EE 6 (take a transactional EJB 3.1, a few JPA 2.0 entities, package everything in a war, no interfaces, no XML, and you are done).

The second use case is to use some bits of Java EE 6 as a jigsaw puzzle at my customers. The beauty of EE 6 is that most specifications can be used separately. At the moment I'm using Bean Validation and JPA 2.0 under Tomcat, no need to use the full platform not to deploy it to a full compliant application server.

In my case, Spring is limiting a wider adoption of Java EE 6. Only very recently Spring Web Flow has started to support bits of JSF 2.0. The day it fully supports it, I will be able to add a few extra specs in my applications.

Another technological limitation is the limited number of containers that implement Servlet 3.0 and EJB 3.1. Today, only GlassFish and Resin implement the Web Profile (and the full profile for GlassFish). But JSF 2.0 can run on Servlet 2.5 (i.e Tomcat 6.x).


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

In fact, if the question was "What Java EE 6 technologies are you NOT using and why?" I would have answered Servlet 3.0 and EJB 3.1 because they need containers (even if EJB 3.1 has an embeddable container that goes with it) and as I said, there is still a lack of containers implementing them. The rest of Java EE 6 can be used on a per-specification basis. At my customers I use any piece of Java EE 6 that I can. Bean Validation 1.0 and JPA 2.0 are so easy and well integrated that I use them as much as I can. The integration between Bean Validation and JSF 2.0 is also very handy. JAX-RS is a fantastic RESTful web services API that you can use with Servlet 2.5 containers such as Tomcat 6.x. I'm not even talking about JMS, JAX-WS and JTA that I use on a day to day basis.


3. What is your development and deployment environment?

I am an IntelliJ Idea addict. I gave up trying to figure out how Eclipse tries to work and which plugins to install (sorry, it’s not called plugins now but OSGI bundles, the ones you start and stop at runtime… what a joke). Once in a while I use NetBeans, but the Java EE 6 support with Intellij is really amazing. And then, I really have two different kinds of usages: GlassFish, H2 and MySQL and at my customers it's more Tomact, WebLogic, Websphere (unfortunately) and Oracle. Even if I have lots of complaints about Maven, I use it everywhere so I can be IDE-agnostic when I need to build my projects.


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

Being a former BEA employee from 1999 and 2001, I can say that I've used all versions of the Java EE platform (from J2EE 1.2). The early versions being a very painful experience. I did a lot of Entity Beans CMP and it was a real nightmare. I remember the very first EJBs when the deployment descriptor was serialized and then it became XML files. Migrating from Entity CMPs to JPA was not easy as you had to go to your customer and say "sorry, we lied to you, Entity Beans CMP are not great and guess what? you need to throw your code to the bin and start with a fresh JPA 1.0 domain model". Like everybody I moved to Struts, Hibernate and Spring. But I quickly realized that I wasn’t an XML fan and found Spring was becoming too complex and messy for my needs. Since Java EE 5 development on server side has been simplified with convention over configuration with containers doing most of the work. Migration and portability has improved, I often work with customers who develop Java EE 5 application on one application server and deploy it in another. Java EE 6 goes even further in terms of portability.


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

Jigsaw puzzle, Modular, standard, less xml, easy, easy, have I said easy?


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

Well, first of all you should buy my book ;o) (http://apress.com/book/view/1430219548) Java EE 6 is modular; don't see it as a blob. Take the bits and pieces that you need. Start with JPA 2.0 and Bean Validation, that's easy. If you can, add JSF 2.0 that will simplify configuration, resources management and component development. Take JAX-RS if you do RESTful applications. For injection, and many more, use Weld (the CDI implementation) that runs also on Tomcat. If you do Spring 3.x, think of using @Inject (unfortunately Spring doesn't implement CDI). If you then can use GlassFish or Resin, these are the two implementations ready to execute your EJBs 3.1 (JBoss 6 is on the way). Because Java EE 6 is so simple, don't over engineer your code: interfaces are not always needed; DAOs are not always needed either... KISS and refactor your code later if you really need it.

The final word is, add Java EE 6 specification to your project in an incremental way. When you can get rid of a proprietary framework and change it to a standard one, do so. You will avoid "vendor locking" (or "open source framework locking", as open source is different from open standard). And use design patterns when you really need them.


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

What I really miss in Java EE 6 is something similar to Spring Web Flow or Seam Page Flow. I hope that in Java EE 7 a new specification will come and standardize flow management (for JSF, of course, but something more general letting you manage different sorts of flows).

Batch processing is also something missing. Spring Batch is very good and defines well known principals such as jobs, steps and so one. With EJB 3.1 there is a new Timer Service (inspired from cron and as rich as Quartz). It's time to get a Batch processing specification that can be easily scheduled.

Security is also a difficult point. JAAS is too low level. Even if there are some improvements in the Servlet 3.0 API, there is still room to tight the platform together in terms of security.

Packaging could also be changed in Java EE 7. We talk a lot about OSGi these days. As a developer I found it too difficult, I would like the EE 7 platform to simplify the creation of bundles (OSGi or something different but compatible). I’m also hoping that Java SE 7 will become more modular. Modularity in Java SE 7 + OSGi packaging in EE 7 would be a great combination.

And I remember talking to Adam Bien about it, JMS hasn't changed for more than a decade, it should benefit from the novelties of the platform and get simpler.

In a word, I would like Java EE 7 to get richer (more specs), simpler (less code to write) and more integrated (security is one example).


Are you using, consulting, training, authoring books, etc in Java EE 6 ? Drop a comment 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.

Technorati: javaee6 community feedback antoniogoncalves glassfish v3

Wednesday Jun 23, 2010

QA#2: Java EE 6: Integrated specifications, simple and annotation driven, next level of industry standard - by Markus Eisele

This blog entry is second (previous ones) in the Java EE 6 feedback from the community series. You can learn about how Java EE 6 is currently being used in production, development and deployment environments used within the community, and even feature requests for Java EE 7.
This entry comes from Markus Eisele - a senior technology consultant working for msg systems ag in Germany. The msg systems ag is one of the top 10 IT consulting and systems integration companies in Germany. Markus works as a software architect, developer and consultant. He also writes for German IT magazines. Markus joined msg in 2000 and has been a member of the
Center of Competence IT-Architecture since then. After being a Technical Director with BEA Systems, he has been a proud member of the Oracle ACE Directors program since 2008 (for Fusion Middleware and SOA). He works daily with customers and projects dealing with Enterprise Java and other new technologies, on a variety of platforms using different vendors. You can catch him on @myfear or read his blog.

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

Higher integrated specifications, simple and annotation driven, single-classloader WARs, next level of industry standard


Read on for other fun stuff ...

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

Enterprise Java has been my business since more than 9 years now. The first J2EE server I was using was the former BEA WebLogic 5.1. It supported Java 2 Platform, Enterprise Edition Specification, v. 1.2 (containing EJB 1.1, JDBC 2.0, JSP 1.1, Servlet 2.2). To be honest, it wasn't big fun looking back into these days. There was lots of configuration and weird coding. And don't even think about full-blown IDE support. It was very basic and lots of coding had to be done without any assistance.

Compared to that Java EE 6 seems to be this feels as if it is light years ahead. So many things happened to the standard in the past and it is still very exiting to see the ongoing changes. Even though I am not a member of any related expert group, I am closely monitoring the public discussions and outcomes. What I can evaluate more is the adoption in the enterprise with our customers. They are more like fast followers than early adopters. And that's basically the setup I am looking at Java EE 6 today. More from an educational or research point of view. The goal is to be ready when first customers jump in. We have to answer questions for them, like:

- What can we do to migrate existing applications?
- What is the most standards compliant way of using this technology?
- What application servers should we use?
- What do the new specifications save in terms of time and/or money?
- How stable are new product versions?

If first projects start using new standards, we will be there to support them and already have answers at hand. At the moment we do not start over with Java EE 6 in projects. First projects are expected with the first commercial server versions from Oracle or IBM (WebLogic respectively WebSphere). Some of our customers are using GlassFish and they are sticking to the latest GlassFish 2.x versions while waiting for the clustering support coming in GlassFish 3.1. In the meantime we try to enable the developers with workshops and informative sessions about new features and updated specs.



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

I am still working my way through the new features at the moment. Of both: GlassFish 3.x and Java EE 6. I started with the new CDI (JSR-299 + JSR-330) capabilities and looked at the improvements for implementing business logic with EJB 3.1 and JPA 2.0. The JSF 2.0 features gave a face to many of my prototypes.

The biggest improvements at the moment are the no-interface beans and the JPA 2.0 enhancements. In combination with the single-classloader model of WAR-deployment this is very handy for even the smallest applications. A situation we were forced to use Spring or other frameworks in the past. The ongoing annotation support is another feature-set I love to see. The reduced configuration effort with xml files seems handy but could bear risks for bigger applications using different frameworks and libraries. A big part of our daily work is cluster related. Therefore I am experimenting with the first 3.1 milestones at the moment.



3. What is your development and deployment environment ?

This is highly dependent on our customers. There is no single, company wide directive on what to use. The majority is using Eclipse. I personally prefer the latest Oracle Version (OEPE) but also have different plain Eclipse versions in use. Experimenting with GlassFish 3 I often use NetBeans 6.9 for demonstrations because of the very good GlassFish and Java EE 6 integration. I tend to be very close to productive environments in development. Therefore I am rarely using other databases than Oracle or DB2. I personally love to use MySQL for PoCs or demos.

In general we use lots of other environments based upon customer needs. Maven is the favorite build tool of choice at the moment. Longer running projects however still stick to ANT.



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

I used J2EE since 1.2. Simple, technical migration from one product version to another was not too challenging at all in the past. Problems arose from switching vendors (Oracle/IBM) or updating specifications with major functional changes (CMP/JPA). Most challenging are customers staying with older product versions (and their bugs and needed workarounds). The pollution with workarounds and fixes never did any good in projects. Thankfully the times of custom frameworks to hide complexity seems to be up since Java EE 5. This was probably the most expensive part in many J2EE/Java EE 5 migrations in the past.

Seeing the advantages in OSGi based servers customers will hopefully be able to adopt new standards more easier in the future. Most valuable will be the new Web Profile. Most applications simply use the included specifications and could run on lighter environments. With the new CDI specifications we could remove some third party solutions and put it in the standard way. The so far missing JAX-RS closes a big gap left open by Java EE 5.



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

Higher integrated specifications, simple and annotation driven, single-classloader WARs. Next level of industry standard.


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

If you are asking for available servers and the question, which specification is right for me today, I already tried to answering this in my blogpost http://blog.eisele.net/2010/05/java-ee-5-or-6-which-to-choose-today.html.

The programming approach itself is a advancement of existing Java EE 5 projects. Everything is pointing into the direction of POJOs and more Java SE like programming. Container services should be injected respectively annotated in a last step; if needed. Programming is getting more closer to solving business problems and not to the fulfillment of specification or container requirements.



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

I think the specifications are more or less feature complete. Of course I can think of a lot of improvements and I believe it's important to stay up to date and integrate new approaches.

If you look at JSF and the RI for example, I am still missing a lot of more complex components. I always find myself implementing one or two own in my projects. If you work for  more restrictive enterprises, you are not always able to use the component suite of choice. If possible I still prefer to work with either RichFaces or PrimeFaces. Further on the cooperation between JSR 299 and JSR 330 should be clearer in general. The interaction between all JSRs should be taken to a next level. Clear but abstract guidelines
have to be specified, who is working with whom and how. If you look at the @ManagedBean annotation for example, you have three different ways of defining beans that are managed (JSR-314, JSR-316, JSR-299). That's not exactly what I would call intuitive ;)

Generally I would love to see the Managed Beans specification becoming the heart of enterprise java. Containers should belong to the past. Services should be available to POJOs and injected (and of course started) as needed. This could speed up the whole environment a lot and frees developers from having to implement interfaces. But the most important improvements would be administrative. Java EE 7 should put those pruning ideas forward and realy try to drop some old stuff. And finally it is time to
solve all those never-ending licensing discussions about the TCKs!

Are you using, consulting, training, authoring books, etc in Java EE 6 ? Drop a comment 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.

Technorati: javaee6 community feedback markuseisele 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