Re: how to force tomcat to make a single istance of a servlet

2009-06-09 Thread Rainer Jung
On 08.06.2009 19:57, syed shah wrote: Hi Christopher, I want to do this cause i am handling the synchronization myself and infact i am using innodb so i dont want multiple instance of the servlet, although i can handle multiple threads in there. OK, then do not use SingleThreadModel,

Re: how to force tomcat to make a single istance of a servlet

2009-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/8/2009 1:51 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to force tomcat to make a single istance of a servlet Usually, only one instance of your servlet will be

Re: how to force tomcat to make a single istance of a servlet

2009-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Syed, On 6/8/2009 1:57 PM, syed shah wrote: I want to do this cause i am handling the synchronization myself How are you managing the synchronization yourself? What needs to be protected? Why can't you simply use synchronized access to a shared

Re: how to force tomcat to make a single istance of a servlet

2009-06-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Syed, On 6/7/2009 12:53 PM, syed shah wrote: I want to enforce single instance creation for the servlet because I have some code that serves the user requests and i want to implement caching and handle synchronization myself, thanks and best

RE: how to force tomcat to make a single istance of a servlet

2009-06-08 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to force tomcat to make a single istance of a servlet Usually, only one instance of your servlet will be created. Unless using the SingleThreadModel (a really bad idea), the spec allows only one instance of a

Re: how to force tomcat to make a single istance of a servlet

2009-06-08 Thread syed shah
Hi Christopher, I want to do this cause i am handling the synchronization myself and infact i am using innodb so i dont want multiple instance of the servlet, although i can handle multiple threads in there. I just wrote some code thats pretty similar to yours except that i use a int and check if

how to force tomcat to make a single istance of a servlet

2009-06-07 Thread syed shah
hi, I want to enforce single instance creation for the servlet because I have some code that serves the user requests and i want to implement caching and handle synchronization myself, thanks and best regards Fahad