Usually fine-grained means each Entity bean refers to one table -- coarse-grained means each Entity bean refers to > 1 table. The "coarse-grained vs. fine-grained" argument is one of the oldest ones in EJB's. It's mostly gone away with EJB 2.0 and better tools, since most people agree that local EJB 2.0 Entity beans can be fine-grained without much problem. Kyle
Kyle.. Still I am not getting a clear picture abt coarse grained and fine grained..Here in the forum it self it is given a different opinions. for that search for the Coarse grained and fine grained in the search or pleas go to this url in this forum. https://coderanch.com/t/309954/EJB-JEE/java/fine-coarse-grained Hope the same idea has discused in different threads.Hope will come back soon...
Sigh. Stu (in the other thread) was not really talking about coarse-grained vs. fine-grained. He was really discussing an idiom called bulk update that Richard Monson-Haefel introduced in his EJB book. The fine grained vs. large grained approach refers to the fact that some of the earliest versions of the EJB servers had a very inefficient CMP support. Thus, to get around this limitation, the vendors suggested that you not use CMP (which naturally maps one Entity bean to one table) but that instead you build BMP's that represent a JOIN of several tables and that return value objects representing the information in those tables. They called this "coarse-grained" BMP's and recommended it as the best approach for Entity bean use. However, with the introduction of EJB 2.0 and the vast improvements in the CMP implementations from the vendors, this is no longer necessary. It is now perfectly acceptable in most cases to use CMP's that each map to one table since automatic container-controlled joins and caching mechanisms can make this more efficient than the coarse-grained BMP case. As a result, newer books (like Floyd Marinescu's EJB Design Patterns book) refer to coarse grained BMP's as an anti-pattern, rather than a pattern to be followed. Kyle
Oke then, SO when we are left with the choices of implementing an Internet Banking Solutions based on J2EE, on the Business Tier, which one are more effective to be used: Session EJB or Entity One? Since the Database Tables in Banking are pretty huge. Is Session EJB pretty safe for Internet Banking Like applications. Rgds GJ
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad: