Devaraj Sambandan wrote:
>
> Is  Bean Managed Persistence is supported For Stateless Session Beans ?

Technically, no.  There are no load, store, remove, etc. methods for
session beans.  The idea behind session beans in general is that they
are not written to a persistent store.

Stateless session bean instances *should* have no information to *be*
stored.  By definition they don't keep state.  It's in the name.  In
fact, they are meant to be completely interchangeable, such that when
Jim comes in and asks for an instance the first time, Alpha is
returned.  If Jim (or any other) user then asks for another instance
later, that same or any other instance might be returned.  (Alpha might
even have been GC'd depending upon server load and container
implementation.)  Regardless, Jim shouldn't notice or care because Alpha
was a stateless bean which does not keep state.

For statefull session beans, the answer is different.  If Jill gets a
reference to an instance Beta, then she should continue to get Beta (or
something that looks like Beta) as long as her session is valid.  This
is because the bean stores some amount of state for the duration of the
session.  Again, it's in the name.

Now, Rickard was partly correct in that you *can* play with the
specification  and probably get something *like* BMP for session beans.
I don't really recommend even trying that unless your particular EJB
server doesn't support entity beans.

The short form of all this is:  Entity beans were meant to handle
persistent objects; session beans were not.


~Mike

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