You guys are confusing me...
At 10:52 27/03/2002 +0100, you wrote:
Great, that's what I thought. But here's why I'm getting confused. The
servlet tutorial says that a servlet is created once and once
only (that's
when the init() is run).
First of all, thank you so much Alexander for taking the time to explain
this so thoroughly.
First, am I correct in saying that the default behaviour for a
Javabean is that each servlet or JSP that uses it will create a new
instance of that Javabean ? For example, if we have
One common technique to solve this is to use JMS. All beans that are
instances of the same user listen to the same topic. when one instance
of the user's bean is updated, the other instances are notified. Each
bean then goes to the database to refresh itself.
peter lin
Chenming Zhao wrote:
Users List [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 1:32 PM
Subject: Re: AW: Multiple users share java bean?
One common technique to solve this is to use JMS. All beans that are
instances of the same user listen to the same topic. when one instance
of the user's bean is updated, the other
-
From: peter lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 1:32 PM
Subject: Re: AW: Multiple users share java bean?
One common technique to solve this is to use JMS. All beans that are
instances of the same user listen to the same topic
, March 26, 2002 2:06 PM
To: Tomcat Users List
Subject: Re: AW: Multiple users share java bean?
What's the meaning of JMS? I'm not sure my problem is just what you said. I
want to get independent instance or the same bean for each user. So they can
work independently, and won't influence with each
I misunderstood. You want many users to use the same bean to get common
information, kind of like a message board. each user works
independently, but they are using a common bean.
someone else said If it is the latter, then just use local variables in
your bean methods.
more information about
Referring to this point:
Great, that's what I thought. But here's why I'm getting confused. The
servlet tutorial says that a servlet is created once and once only (that's
when the init() is run).
If I comment out the init() method in my servlet do I get an instance of it
for each request?
- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 2:12 PM
Subject: RE: AW: Multiple users share java bean?
Are you sure you really want independent instances of the bean, or just
the
ability to keep
: AW: Multiple users share java bean?
- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 2:12 PM
Subject: RE: AW: Multiple users share java bean?
Are you sure you really want independent instances
when
I open windows for multiple users. Is it the problem of the server or
setting?
- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 3:28 PM
Subject: RE: AW: Multiple users share java bean?
Are your sure
PM
To: Tomcat Users List
Subject: Re: AW: Multiple users share java bean?
- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 2:12 PM
Subject: RE: AW: Multiple users share java bean
12 matches
Mail list logo