Design patterns were the main area of focus on the second day of EJB for Architects. Partha discussed The Strategy Pattern, the Session Facade, The Business Delegate, DTO's and various other patterns which catered to application-specific needs. JMS and Message Driven Beans occupied a good part of the afternoon followed by a lead into BMP and CMP 2.0. Some positive feedback was given by students on these discussions.
Read Day 2 Coverage of EJB For Architects
"Using this pattern, a session bean can talk to multiple entity session beans below it."
Man, I finally start to make progress on session EJBs and entity EJBs, and then I find out there is a new beast.... entity session EJBs. :)
"Man, I finally start to make progress on session EJBs and entity EJBs, and then I find out there is a new beast.... entity session EJBs. :)"
Sorry Mike, didn't mean to create a two-headed monster. :) I meant to say session beans fronting entity beans.
Thanks Nitin. I appreciate you posting what's going on in the class. I knew what you meant... just trying to add some humor. You need a little humor when trying to tackle J2EE and EJB land. "Two headed monster" is pretty good.
"...Using this pattern, a session bean can talk to multiple session beans that front other entity beans..."
But isn't session bean chaining is forbidden?
*Stateless* Session Beans talking to other *Stateless*
Session Bean is alright.
But a *Stateless* Session Bean talking to a *Stateful*
Session Bean, whilst not forbidden, is rather silly as
is a Stateful to another Stateful.
It is important to consider which bean type is calling
Just some random thoughts.
This is a bit long winded so apologies in advance.
I have been on a number of EJB projects over the last couple of years and most of them have followed a similar pattern ie MVC presentation (a la Struts/webwork), session bean facade fronting either BMP entity beans or plain jdbc (DAO) classes. The persistance layer generally fronted a relational database or third party product like JDE and value objects were used to represent the application entities.
From reading various post on this and other sites this sort of setup appears to be pretty common.
We are just about to start on a brand new project and I was just wondering what is the best way to go with the advent of things like EJB2 and JDO. I realise that the design will be dependent on a lot of factors but i'm just curious as to what people think are the best practices based on the latest technology.
This really looks excellent. The training approach sounds very effective to me. I plan to recommend Partha to my employer.