JEE 6 patterns – the server side java symposium

As of Websphere 8, all major app servers support J EE 6 except one that I hadn’t heard of. Adam Bien got a number of jabs in at Rod Johnson’s comment that NetBeans isn’t prevalent.

Many patterns are gone from earlier versions of JEE including this list. Amazing how much content was discussed on one slide.

  • most interfaces – Adam mentioned another valid use of interfaces – reuse. Also noted the IXXX or XXXImpl are signs that the interface isn’t needed.
  • DAOs – should be able to state the reason if have. To avoid duplication have a service with a business name. for example OrderSearchService
  • DTOs – duplication across layers. And if you use a mapping framework like bean utils, you aren’t really decoupling. It is useful to do create a DTO when you don’t have control over the underlying object. Similar reasoning to interfaces. A good metric is whether every layer is affected for a feature request
  • ServiceLocator, Factory – use injection
  • Business Delegate – just delegates to ejb, for handling exceptions
  • Session Facade – needed to wrap CMP because didn’t work well
  • Value Object Assemblers – can just create aggregate object
  • Service Activator – asynchronous support now built in with annotation or CDI events if want ti decouple
  • Publish Subscribe with JMS – for local delivery, use CDI events instead
  • Mandatory XML configuration – Repeating the whole package name in xml so hard to refactor. Adam sounds like he favors minimal XML. I asked what belongs in XML and the answer was passwords/ips. [I don’t think he meant passwords]. He did say anything that could change often.

Other Notes

  • Keep the war as small as possible to speed up deployment. try to keep infrastructure jars out of war manage versions of jars by deploying to separate tomcat if have to use third party jars. Adam doesn’t use third party jars unless absolutely necessary
  • go for convention over configuration
  • ECB – entity (jpa) control (optional cdi bean) boundary (stateless entry point decorated by aspects), way to model a component
  • see anti if campaign website for the lack of OO in JEE

I missed a bit of this presentation even though it was really good because I was getting ready for mine.

Glass fish and JEE 6 keynote at the server side java symposium

Oracle’s first slide is a TEN LINE disclaimer from their legal department.  Which must be standard because nothing was forward looking.


  • Split  sub platforms so less large
  • JEE web profile
  • New: managed beans, bean validation, CDI (dependency injection)
  • ejb 3.1 lite lets you use ejb in a war file
  • Ear files are now for backward compatibility
  • Encouraged use of setting up everything in annotations instead of web.xmk [I think somethings belong eternalized]
  • Putting a web-fragment.xml file inside your meta-inf directory lets jars contribute content to the web.xml
  • Can promote a managed bean to a “real ejb” to take advantage of transactions
  • Showed response builders for web services. Nice concise way if setting status, content type, result, etc.
  • Ejb 3.1 supports singleton and start up beans. Can set scheduled tasks and asynchronous tasks in annotations as well.
  • Going to great lengths to avoid mentioning Spring,  Guice was cited as the comparison/example of dependency injection. Speaking of Spring, this is the first time I’ve seen this much JEE 6 code. It looks a lot like Spring.


  • Web profile ships with REST
  • Glassfish is wonderful because Oracle says so. Not taking further notes on this. Do people really use Glassfish in production?