An instance of a stateful session bean
- gets created with create() - this also creates state (invoking create
again, gets you a differnent instance)
- if you keep invoking methods on the bean, you keep accessing the same one
(hence the bean can maintain
  state)
- gets destroyed (bean instance and it's state) when you invoke remove() or
when it times out
- gets passivated after a while of inactivity and (re)activated when needed
(ie any method gets 
  invoked on it)

So in your case, your rendering frontend (JSP/servlet) will have to handle
the user session mgmt
and associate the rights JavaBeans with the right user, and the javabeans
will have to manage the
life cycle of your EJB (stateful session) beans.


Robert.
> -----Original Message-----
> From: R Naithani [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 8 January 2001 17:14
> To: [EMAIL PROTECTED]
> Subject: [jBoss-User] Re: Confused about statefulness
> 
> 
> Yeah but what is it in a client that makes the session kick 
> off? Is it the
> instantiation of the stateful session bean?
> Suppose I instantiate a stateful session bean from a normal 
> java program.
> How will the bean know when the session is supposed to end?
> In case of browser based clients in a setup like the following:
> pages (apache+tomcat) -> Java Beans -> stateful session beans/entity
> beans(BMP) (JBoss Server)    -> Database
> How will the JBoss server know when did the user log in to my 
> app? Is it
> whenever in the code a stateful session bean instantiated 
> (normally at login
> time).
> Thank you!
> Rahul.
> ----- Original Message -----
> From: "MEENAKSHISUNDARAM Anand" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 08, 2001 10:31 AM
> 
> 
> > Connected client is typically a java program. It could be a 
> servelet,
> > Jsp(which gets converted in to a servlet) or a standalone 
> java program. It
> > could also be a CORBA compliant client(- which could be not java
> client -of
> > which am not very clear).
> >
> > Anand Meenakshisundaram
> > CBS India - Bangalore
> > Phone :91-80-5268694/5  Extn.6876
> > Fax : 91.80.5261501
> > Email: [EMAIL PROTECTED]
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 
> --
> --------------------------------------------------------------
> 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