Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The EntityBean is not necessary?

Status
Not open for further replies.

IPOz

Programmer
Jul 11, 2001
109
CN
Hi,friends,
I have developed some DAO classes which are used to handle RDBMS operation.In my application i only use SessionBean to finish the project:
JSP->JavaBeans->SessionBeans->DAO->DBMS
It seems that the EntityBean is not necessary doesnot it?
Any suggections are appreciated!
IPO_z@cmmail.com
Garbage in,Garbage out
 
Good ole Entity Bean vs. DAO argument.

Personnally I don't see Entity Beans as the fit-all solution that Sun would like everyone to believe. In the cases where I do use Entity Beans I access the DB thru DAO classes. The good thing about Entity Beans is that it can offer much better performance since you don't end up hitting the DB with each request. With DAO, no matter what, you are making a request to the DB. The main problem with Entity Beans is that if there is not a nice one-to-one mapping with the database than they are pretty much useful. I think moderation is the key. Anyone who solely uses Entity Beans for DB access is a fool, it isn't a choice solutions in all cases. On the otherhand, anyone who refuses to use Entity Beans at all is being just as foolish.

Another question is Caching DB results in a DO vs. using Read-Only Entity Beans. My decision on this is still up for discussion.
 
Thanks for your quick response! But i need more details to understand it .
If i want to fetch records from DB how can i get the ResultSet from EntityBean? It seems that one EntityBean correspond to one row.

Regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top