Hey
[EMAIL PROTECTED] wrote:
> 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.
Good and valid points, but it still seems like overkill (and confusing)
to have an empty Session interface. Or what would it include?
> 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.
Use ejb.getHome().getEJBMetaData().isSession(). However, this might give
a roundtrip or two depending on implementation though, so in this case
it would be beneficial to have Entity and Session marker interfaces.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
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".