|
Hi
Sorry
for the confusion. If you have a statefull session bean (SSB) you just store the
reference to the bean in http session, not the bean itself (At least with remote
beans). The reference has approximately fixed size, and the shopping cart
does not. If you don't store the reference then you would't have to create
the bean on every request, and that would give you a blank SSB
every time. The http session is used to fake state in a protocol that are
stateless.
So, as
an answere to your last question, you need to store the SSB reference somewhere,
and that somewhere could be http session. As far as I know the http client can't
store a bean, and if it could i shouldn't be allowed to do it. That would give
the client user ability to modify it, and possibly do harm to your
system.
Shortly. When not
using ejb's, all client state is stored in http session. When using SSB,
reference to klient state is stored in http session and the "real" state in the
SSB.
As an
alternative you could use a session id (or something like that) as a
lookup key to get the SSB each request, but then you would need some other
mechanism to hold the references. Or you could use the session id to query a
database through a stateless session bean.
I'm
still not sure if I would recommend SSB used like this since I really don't know
how it performs, and of cource it depends on the spesification of the overall
system.
Oystein
|
Title: RE: [Xdoclet-user] xPetStore v2.1 released
- [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- SV: [Xdoclet-user] xPetStore v2.1 released Oystein Aadland
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- RE: [Xdoclet-user] xPetStore v2.1 released Orhan UGURLU
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- [Xdoclet-user] xPetStore v2.1 released Oystein Aadland
- [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- SV: [Xdoclet-user] xPetStore v2.1 released Oystein Aadland
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
- RE: [Xdoclet-user] xPetStore v2.1 released Herve Tchepannou
- Re: [Xdoclet-user] xPetStore v2.1 released Brian McSweeney
