Re: Single Thread is deprecated?

2006-01-10 Thread Leon Rosenberg
On 1/9/06, Wade Chandler [EMAIL PROTECTED] wrote: ... I don't know about 5.5.15, but 5.5.9 used HashMap. The synchronization of the session object was an issue which caused other issues and is why there should now be synchronization on the reading as well as writing session attributes. There

RE: Single Thread is deprecated?

2006-01-09 Thread Duan, Nick
on HttpSession in tomcat is unnecessary. ND -Original Message- From: GB Developer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 6:33 PM To: 'Tomcat Users List' Subject: RE: Single Thread is deprecated? -Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Friday

RE: Single Thread is deprecated?

2006-01-09 Thread George Sexton
-Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 11:41 AM To: Tomcat Users List Subject: RE: Single Thread is deprecated? HttpSession should be implemented (it's just an interface). In fact, the session attributes were implemented

RE: Single Thread is deprecated?

2006-01-09 Thread Wade Chandler
--- Duan, Nick [EMAIL PROTECTED] wrote: Well, when I was mentioning the term user session, I was discussing from a threading/transaction perspective, not from the servlet object perspective. It is the worker thread that represents a active user session and accesses both the session and

RE: Single Thread is deprecated?

2006-01-09 Thread Wade Chandler
--- Wade Chandler [EMAIL PROTECTED] wrote: --- Duan, Nick [EMAIL PROTECTED] wrote: Well, when I was mentioning the term user session, I was discussing from a threading/transaction perspective, not from the servlet object perspective. It is the worker thread that represents a

Re: Single Thread is deprecated?

2006-01-09 Thread Michael Echerer
George Sexton wrote: -Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] HttpSession should be implemented (it's just an interface). In fact, the session attributes were implemented as a Hashtable in tomcat, not a Hashmap (just double checked the latest 5.5.15 src of tomcat).

Re: Single Thread is deprecated?

2006-01-07 Thread Michael Echerer
GB Developer wrote: Sessions are (never?) thread-safe. Which is perhaps one reason why SingleThreadModel was deprecated. People thought by using that interface that they would never have to worry about synch issues again. The servlet spec 2.5 draft says in SRV 2.2.1. (should be similar in

Re: Single Thread is deprecated?

2006-01-07 Thread Dakota Jack
-Original Message- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:52 AM To: Tomcat Users List Subject: Re: Single Thread is deprecated? Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race

Re: Single Thread is deprecated?

2006-01-07 Thread Michael Echerer
Dakota Jack wrote: Actually, any class with only local variables is always thread safe. True for locals, but we were talking about instanceclass variables, actually. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Single Thread is deprecated?

2006-01-07 Thread Michael Echerer
Michael Echerer wrote: Dakota Jack wrote: Actually, any class with only local variables is always thread safe. True for locals, but we were talking about instanceclass variables, actually. You may of course still have instanceclass variables... ThreadLocals (usually static) work fine ;-)

Re: Single Thread is deprecated?

2006-01-06 Thread Remy Maucherat
On 1/6/06, Christian Stalp [EMAIL PROTECTED] wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable code. So what can

Re: Single Thread is deprecated?

2006-01-06 Thread Christian Stalp
Remy Maucherat wrote: It's deprecated because it is confusing, but it is actually very useful performance wise in some cases, since it does pooling. I will make sure this feature remains available in the future. That means, I still can use it?! Deprecated is not prohibited!?!! Is there any

Re: Single Thread is deprecated?

2006-01-06 Thread David Kerber
Christian Stalp wrote: Remy Maucherat wrote: It's deprecated because it is confusing, but it is actually very useful performance wise in some cases, since it does pooling. I will make sure this feature remains available in the future. That means, I still can use it?! Deprecated is not

Re: Single Thread is deprecated?

2006-01-06 Thread Wade Chandler
--- Christian Stalp [EMAIL PROTECTED] wrote: Remy Maucherat wrote: It's deprecated because it is confusing, but it is actually very useful performance wise in some cases, since it does pooling. I will make sure this feature remains available in the future. That means, I still

Re: Single Thread is deprecated?

2006-01-06 Thread Michael Echerer
Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable code. Usually the best solution is to

Re: Single Thread is deprecated?

2006-01-06 Thread Remy Maucherat
On 1/6/06, Michael Echerer [EMAIL PROTECTED] wrote: In worst case you won't even achieve what you want using single thread mode because according to the servlet specification servlet containers are free to pool servlets, if it implements SingleThreadModel. Hence you could have multiple pooled

Re: Single Thread is deprecated?

2006-01-06 Thread Michael Echerer
Remy Maucherat wrote: On 1/6/06, Michael Echerer [EMAIL PROTECTED] wrote: In worst case you won't even achieve what you want using single thread mode because according to the servlet specification servlet containers are free to pool servlets, if it implements SingleThreadModel. Hence you could

Re: Single Thread is deprecated?

2006-01-06 Thread Christian Stalp
Remy Maucherat schrieb: Nice, but completely wrong. STM in Tomcat uses an instance pool which allows having a minimal impact (something like 5%), and it will perform much better than syncing, unless the said sync is trivial. The reason this is deprecated is because some people thought it would

RE: Single Thread is deprecated?

2006-01-06 Thread Duan, Nick
List Subject: Re: Single Thread is deprecated? Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable

Re: Single Thread is deprecated?

2006-01-06 Thread Michael Echerer
Thread is deprecated? Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable code. Usually the best

RE: Single Thread is deprecated?

2006-01-06 Thread Duan, Nick
of HttpServlet, why bother to sync them? ND -Original Message- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 5:44 PM To: Tomcat Users List Subject: Re: Single Thread is deprecated? Duan, Nick wrote: HttpServlet is inherently thread-safe as long as you don't

RE: Single Thread is deprecated?

2006-01-06 Thread Caldarale, Charles R
From: Duan, Nick [mailto:[EMAIL PROTECTED] Subject: RE: Single Thread is deprecated? Typo due to my laziness. I knew someone was going to catch this. Actually the sentence should read: ... because there is only one servlet that is active during a single user session. Are you really

RE: Single Thread is deprecated?

2006-01-06 Thread GB Developer
-Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 5:14 PM To: Tomcat Users List Subject: RE: Single Thread is deprecated? Typo due to my laziness. I knew someone was going to catch this. Actually the sentence should read: ... because