>
> How does a stateless Session bean guarantee that the data is
> always fresh?

I don't understand. What data? I thought we were looking at the persistent,
distributed, concurrent version of

    static synchronized int getNextIDFromSequence() {
        return id++;
    }

> Also since these sequence numbers are pretty much the
> intermediate state of
> a data model between calls, doesn't this just scream "Entity Bean"?

The only thing that screams "Entity Bean" to me is persistence. Sure, the
sequence is persistent. But it is also a singleton, and entity beans scream
"Not a Singleton, Please!".

>
> I know the following is an ongoing discussion on the net,
> but, I'll take the
> angle that I could use simple CMP and some sort of a
> singleton handing out
> the 'next' number. Even large requests would be minimal to
> 'get acctountNo +
> 1' and then set the change to the entity bean.
>
> Using this 'design' wouldn't I almost be guaranteed that the
> bean always has
> fresh data? Additionally the 'new' seq number could be mapped to the
> database at any time so that any external acces to the DB
> could use the same
> numbers too?


How do you handle concurrent access to the sequence?

>
> I'm relatively new to the proper in's and out's of this
> architecture so I
> tend to have some misconceptions about it's abilities. Please
> excuse me if
> I'm overlooking some simple point here.
>
> (As an aside I'm not even looking at the effects of all this
> in a clustered
> environment.. which I'm learning seems to be a headache to
> maintain data
> state.)
>
> Thanks.
>
> >
> > I would (actually, I do) go with a stateless session bean if
> > I can rely on
> > non-portable database extensions. While you can shoehorn
> the sequence
> > concept into an entity, it is a bit restrictive. And if
> > you're using BMP,
> > you gain nothing by using an entity.
> >
>

- Avi
--
This signature intentionally left blank.

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