I had to review a proposal for reworking one of our major applications today. The application has a lot of inherent issues, but one of the interesting things was the solution involved a bunch of Stateless Session Bean Facades. Would have been a reasonable solution except they were describing an application that was to be completely contained in a single J2EE container. The system connects to a legacy mainframe application and a relational database. It of course doesn’t do distributed transactions. So I’ve got no idea why EJBs were proposed.
I’m guessing the Session Facade was proposed by default because a lot of consultants in the Java world are still selling EJB as the way to go. I half expect to get the ‘Enterprise’ development argument when I get together for feedback. The argument goes something like, well you wouldn’t want to build an application without EJBs, how will it scale. Core J2EE Patterns has been updated with a ServiceFacade pattern which allows for a POJOFacade Implementation. Maybe this is why I prefer the mentoring consultant model where the consultant’s major goal is to get a team up to speed.