Ufff!... this really seems to explain what's going on...
I bet all lies in a bunch o missunderstood concepts in my side...

Anyway, the stateless bean was not bound to have state. :-)
Just trying to force my concepts (another way of learning, I think...)

Lots of thanks for your help!

_
Jorge

----- Original Message -----
From: "Sebastien Alborini" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 3:15 PM
Subject: Re: [jBoss-User] Session state...am I missing something?


> Hi,
>
> How do you access your session bean?  I suspect you do a home.create()
> each time your jsp runs. In this case, the following will happen:
>
> - stateful : jboss creates a new instance. "The state is lost", because
> you see a new bean each time
>
> - stateless : since stateless beans have no state, jboss can and does
> reuse them. This means if your stateless session has a state (bad!) it
> may appear to be kept across jsp page loads.
>
> The suggestion is to cache a reference to your bean in your jsp (don't
> create it each time).
> And don't put state in your stateless beans! :-)
>
> Sebastien
>
>
> Jorge Uriarte Aretxaga wrote:
> >
> > Hi!
> >
> > Just playing around with the jboss/tomcat bundle, testing differentes
entity
> > beans, playing with my databases, finding no big trouble till today.
> > Today, I wrote a jsp page to get/use a Session Bean, and began playing
with
> > its session-type in the ejb-jar.xml.
> > Well, seems like when I declare it as "Stateful", it DOES NOT keep the
state
> > between page loads, but when I declare it as "Stateless", it DOES KEEP
the
> > state!
> > Well, I was no sure about the state being saved between jsp page loads
(that
> > was the case being tested!) but this behaviour seems rather strange for
> > me...and seems too much a change for being a bug, so I guess I'm missing
or
> > missunderstanding something but... what the ....?
> >
> > TIA!
> >
> > _
> > Jorge
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > List Help?:          [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to