> This means, all accessor methods of the entity bean have to
> be duplicated in
> the session bean, which I don't see much sense in (?).

In the entity bean you have the data logic, in the session bean you have
the business logic. You use the session bean to interact with the user.
An example:

SB: CourseEnrollment
EB: Student, Enrollment, Course

SessionBean have following methods:
* enroll(studentId, courseId)

this method uses the Student and Course EntityBeans to verify against
the database that these exist and maybe gets some extra info from the
db, then puts this in the enrollment table using the Enrollment EB.

>
> 1) What's so bad about letting the clients access the
> entities directly?

Because EBs are transactional by nature, and letting the client access
these beans can give you unvanted (long lived) transx and locking
behavior.

> 2) Using the Facade pattern, is there any better way of providing
> fine-grained access for the client?

yeah, like mentioned above ;)

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to