Friday, February 9, 2007

Entity beans and Entity beans Performance?

Entity beans are more costly then Session beans for one simple reason that Entity beans are special types of Session beans(Entity beans are build over session beans). One point to note is that Entity beans never store any state like statefull beans (They are database persistant and not memory persistant like StateFull beans). For every call or for any update or for any operation it will query the database. Now again there are two considerations in entity beans, CMP and BMP. A project coded using Session beans will any time perform better then BMP's. So the level of performance can be listed in the order of best to worse (in case of database operations)
1.Entity beans 2.BMPs 3.CMPs
U may consider this before u make any decision. In one of my project we had to drop the CMP design at the last moment because of the speed consideration. Entity type beans are ment as a better s/w design practice and not ment for a better performance. You should consider a tradeof, may be by using BMP's.


Entity beans www.referjava.com

No comments: