RE: Multiple users share java bean?

2002-03-27 Thread camccuk
--- "Dahnke, Eric" <[EMAIL PROTECTED]> wrote: > >If I comment out the init() method in my servlet do I get an instance of it > >for each request? > > > >Do people commonly do this? > > I suspect that if you do this Eric, it won't compile... > > > It compiles fine, and works fine too. But I hav

RE: Multiple users share java bean?

2002-03-27 Thread Dahnke, Eric
>If I comment out the init() method in my servlet do I get an instance of it >for each request? > >Do people commonly do this? I suspect that if you do this Eric, it won't compile... It compiles fine, and works fine too. But I haven't testing it in a multiuser environment yet. -- To unsubscrib

Re: AW: Multiple users share java bean?

2002-03-27 Thread camccuk
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). > http://java.sun.com/docs/books/tutorial/servlet

AW: Multiple users share java bean?

2002-03-27 Thread Alexander Reifinger
> I describe the work what I need to finish. > First the jsp file gets a user name, then pass it to java bean. > And the bean > get some values from the database accoding to the user name, then get a > result and save it to database. The idea of synchronized objects cannot > work. I want to acitv

AW: AW: Multiple users share java bean?

2002-03-27 Thread Alexander Reifinger
> First of all, thank you so much Alexander for taking the time to explain > this so thoroughly. *bow* > Now, since each JSP is essentially a servlet, how does the > servlet perform > the sharing of the javabean ? Does a servlet that shares a > javabean (similar > to the JSP case [d] above, whe

Re: AW: Multiple users share java bean?

2002-03-26 Thread Joel Rees
CTED]> > 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 loginname is getting set properly? Try including the value > in > > your

Re: AW: Multiple users share java bean?

2002-03-26 Thread Chenming Zhao
oblem 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: A

RE: AW: Multiple users share java bean?

2002-03-26 Thread Wagoner, Mark
: 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 y

Re: AW: Multiple users share java bean?

2002-03-26 Thread Chenming Zhao
- 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

RE: AW: Multiple users share java bean?

2002-03-26 Thread Dahnke, Eric
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?

Re: AW: Multiple users share java bean?

2002-03-26 Thread peter lin
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

RE: AW: Multiple users share java bean?

2002-03-26 Thread Wagoner, Mark
, 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 infl

Re: AW: Multiple users share java bean?

2002-03-26 Thread Vijay Shinde
anks. > > - Original Message - > 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

Re: AW: Multiple users share java bean?

2002-03-26 Thread Chenming Zhao
MAIL 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

Re: AW: Multiple users share java bean?

2002-03-26 Thread peter lin
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: >

AW: Multiple users share java bean?

2002-03-26 Thread Chenming Zhao
In fact, it's a good and difficult topic. Now I haven't still understood it completely. I have a question about my application. I describe the work what I need to finish. First the jsp file gets a user name, then pass it to java bean. And the bean get some values from the database accoding to the

Re: AW: Multiple users share java bean?

2002-03-26 Thread Soefara Redzuan
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 > Regi

AW: Multiple users share java bean?

2002-03-26 Thread Alexander Reifinger
http://shannon.informatik.fh-wiesbaden.de/jsp/jsp/index.html Alexander > -Ursprüngliche Nachricht- > Von: Robert Douglass [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 26. März 2002 10:21 > An: Tomcat Users List > Betreff: RE: Multiple users share java bean? > >

RE: Multiple users share java bean?

2002-03-26 Thread Robert Douglass
What is the German book you were going to recommend? -Original Message- From: Alexander Reifinger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 10:04 AM To: Tomcat Users List Subject: AW: Multiple users share java bean? > First, am I correct in saying that the defa

AW: Multiple users share java bean?

2002-03-26 Thread Alexander Reifinger
> 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 Register.jsp which uses a Javabean > called memberData.java then if 2 people were to submit data to > Regi

Re: Multiple users share java bean?

2002-03-26 Thread Fabian Sommer
Hello guys, i expect beans and servlets to behave different? As i know servlets should only be instanced once in the servlet container, and each request should be handled by the same instance of the servlet. To handle different data for different users, you need to use session tracking and sto

Re: Multiple users share java bean?

2002-03-26 Thread Soefara Redzuan
ages where I question the fundamental understanding. I must go read the servlet API I think. Soefara. >From: Daniel Hinojosa <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> >To: Tomcat Users List <[EMAIL PROTECTED]> >Subject: Re: Multi

Re: Multiple users share java bean?

2002-03-25 Thread Daniel Hinojosa
t;Daniel Hinojosa" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Monday, March 25, 2002 11:35 AM >Subject: Re: Multiple users share java bean? > >>If it's a shared bean, sycnchronize it. Make sure that >>all mutators(S

Re: Multiple users share java bean?

2002-03-25 Thread Chenming Zhao
;[EMAIL PROTECTED]> Sent: Monday, March 25, 2002 2:29 PM Subject: Re: Multiple users share java bean? > > If you have multiple users sharing the same bean, then that's what's going to > happen. By synchronizing the get and set method, all you're doing is saying > &qu

Re: Multiple users share java bean?

2002-03-25 Thread jeff . guttadauro
To: "Tomcat Users List" <[EMAIL PROTECTED]> <[EMAIL PROTECTED]cc: u>

Re: Multiple users share java bean?

2002-03-25 Thread Chenming Zhao
ginal Message - From: "Daniel Hinojosa" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, March 25, 2002 11:35 AM Subject: Re: Multiple users share java bean? > If it's a shared bean, sycnchronize it. Make sure that > all mutato

Re: Multiple users share java bean?

2002-03-25 Thread Chenming Zhao
IL PROTECTED]> Sent: Monday, March 25, 2002 11:35 AM Subject: Re: Multiple users share java bean? > > > Chenming Zhao wrote: > > >Hi, > >When two users call the bean almost at the same time, it seems that they share the same object and their implementing is dependent

Re: Multiple users share java bean?

2002-03-25 Thread Daniel Hinojosa
Chenming Zhao wrote: >Hi, >When two users call the bean almost at the same time, it seems that they share the >same object and their implementing is dependent with each other (I hope they are >independent), and cannot get correct results. Should I configure Tomcat? I think the >java bean is

Multiple users share java bean?

2002-03-25 Thread Chenming Zhao
Hi, When two users call the bean almost at the same time, it seems that they share the same object and their implementing is dependent with each other (I hope they are independent), and cannot get correct results. Should I configure Tomcat? I think the java bean is no problem. It's urgent. Plea