×

Loading...

Not exactly like you stated

1) I still don't know what you mean by the model and why you compare model with pattern.

2. The reverse of your statement is correct. Using SessionBean to access database is more efficient because one is away from the EJB container overhead in managing persistence. Here is an iron-like rule: If the business concept has no records in the database, you cannot use EntityBean and have to use SessionBean. If you use Container-managed EntityBean, you don't need write much code. However, EJB compiler will generate all the code for you to map the bean variables to database fields. This is code is usually not as efficient as what you write.
Report

Replies, comments and Discussions: