Rickard �berg wrote:
> Whether or not to use two interfaces is essentially a
> design issue. It can be argued that by introducing 2 separate interfaces
> (Entity, Session) with a common superinterface EJBObject the
> specification becomes more complex than is necessary since there is so
> little difference. Specifically Session would be empty(!). Because of
> this I agree with the current design.
>
> Simplicity simplicity simplicity...

I agree simplicity is very important. But given the existing distinction in the
spec between entities and sessions, and the way that distinction is already
reflected in the existing spec interfaces by having separate EntityBean and
SessionBean, and separate EntityContext and SessionContext, I think having
separate Entity and Session would be very natural and would not be any
significant loss of simplicity.
It is true that there wouldn't be a lot of differences between the actual
interface definitions (although the support for primary key is all by itself an
important difference). But the nature of entities being shared persistent
objects, unlike session beans, is a substantial semantic difference. The
scenarios where I think the distinction is useful is for any provider of a
generic object or service that is intended to support all entities, but not
session beans. The generic support may be persistently keeping track of the
specified entities (such as by storing the primary key), which wouldn't work for
sessions.  Most services would limit their support to something more specific
than Entity, but an example of the sort of service that might want to be defined
to support elements of type Entity would be a type of collection.
By the way, I do not mean to make a big deal out of this question. It simply
struck me as odd that the Entity and Session interfaces didn't exist, and I
wondered what others thought of it.

Erik Voldal
Email: [EMAIL PROTECTED]
Phone: 507-253-4788

===========================================================================
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