Hello All, can folks, specially the ones who took this exam successfully and all tell me if the EntityBean is a MUST for the Part II? What about using servlets, POJOs, Session Beans and an ORM in place of Entity Bean?
Please let me know what your thouths are on this? Thanks. B.
Entity beans are great solutions to handle automatic persistence transactions and specially, to handle thread synchronization at the entities.
There are many custom architectured based on pojos and Stateless Session Beans (Which means that they use the Fast Lane Reader and DAO patterns together). This kind of architecture works fine for applications where 80% of the time just read only access are made.
But, for applications that is going to be accessed for handred users at the same time (an portal or e-commerce for instance) a over synchronization control are mandatory. Entity beans are good solutions for that case because the ejb container takes care this problem perfectly.
The only bad thing related to Entity beans (I mean, EJB 2.1 or prior) is that the curve line to implement this solution is too huge and are not good for maintaince. Another issue is that entity beans 'must' be used with local interfaces (to achive better performance at pass values by reference) but this approach implies at a extra implemention with facades with remote interfaces and business delegates at the client side to handle the remote interfaces.
My advice is: If you decide to not use Entity Beans, pay attemption in thread synchronization of your entities because it is a very importante non functional requirement of any application.
I fully agree with Ricardo. Entity beans implement a caching mechanism for the lowest level of the DB. In its simplest case, each bean caches information about a row of a table. Now, every caching mechanism makes the architecture and programming more difficult, as it introduces another dimension into the code - time, and the implementation, debugging and maintenance is therefore more complex. However, considering the limitations of current databases, where the burden is all on one server, caching solutions are quite often needed as in our assignment.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.