-1. Sorry, but this is plain wrong, and i would suggest you revert this checkin. My reasons are below, slightly longish, hope you read it thru.
We do NOT suddenly have threading going on! And we ARE 1.2 compatible. And using thread local storage is NOT "thread safety stuff". 1. Shawn's problems are related to synchronized blocks in formula parser. Its due to jdk1.2 bugs. Removing correct functionality (in the threadlocal use) due to this is unacceptable. 2. What do u mean by the fact that POI is not thread safe? Thats too much of a generalisation to mean anything much. You must realise that POI is used extensively in a multithreaded environment (servlet containers). So what you mean, i suppose, is that ONE workbook instance should not be accessed by multiple threads.Which is fine. (However,this fact must be explicitly documented). However, you must realise that multiple threads create multiple workbook instances quite often. If you want to prevent that, its not a nice thing to do. What your checkin has done is completely messed up the use of sheet refs and names when multiple threads create multiple workbook instances .. something that our userbase does very often, using poi in servlets. 3. As for "suddenly", I sent out a mail asking for comments before i used the threadlocal storage. http://marc.theaimsgroup.com/?l=poi- dev&m=102500336918107&w=2 . Which is more than one can say about you when u decide to remove valid functionality from the code, and introduce bugs. 4. ThreadLocal storage does in NO way introduce threading INTO poi. It just ensures poi works correctly in a servlet environment. I think you are being paranoid. 5. As far as the synchronisation of formulaparser.parse is concerned, i was planning to remove it. (I dont think you checkin removes it .. does it? that was shawn's immediate problem, not threadlocal). I put it in originally since i wasnt sure how the parser would be used from high level. I now see it is not needed. However, adding synchronised blocks on code does NOT by itself "introduce" threading. In summary, this commit and should be backed out, ASAP. It does not resolve anybody's problems and introuduces serious bugs. - Avik PS. i also object to a "big hammer" approach to threading issues. Threading issues are very subtle, even if you think your code has nothing to do with threads. Thus a few broad generalisations should not drive your thoughts on thread safe code. A lot of thinking went behind the usage of Threadlocal, including asking for feedback on the dev list. Quoting "Andrew C. Oliver" <[EMAIL PROTECTED]>: > Hi Shawn, > > I just removed the thread safety stuff from the head. Give it a whirl. > We need a better solution for formula workbook context, but this should > at least make us nice and able to run in single threaded contexts for > the moment. > > Thanks, > > Andy > > On Sat, 2002-07-06 at 11:08, Laubach, Shawn - TAFB/LAB NCC (SAIC) wrote: > > Yes. I sometimes question their judgment on that. The current release > > (which is out for everything but windows) is based off of tomcat so..... > > > > Shawn Laubach > > SAIC - Web Developer > > B-1B System Support Management Division > > OC-ALC/LAB, Building 3001, Tinker AFB, Oklahoma > > dsn: 336-2473 comm: 405-736-2473 mobile: 405-245-9562 > > > > > > -----Original Message----- > > From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, July 06, 2002 9:53 AM > > To: POI Users List > > Subject: RE: IllegalMonitorStateException > > > > > > On Sat, 2002-07-06 at 10:05, Adam wrote: > > > Just a question from the lurker pool, but why are you stuck using > JServ? > > > The whole point of using 9iAS is the OC4J container, which is a > licensed > > > version of the Orion server. JServ hasn't been updated in years. > > > > > > > Just for clarification (from my understanding): > > > > JServ > > | > > | Planning starts for a JServ 2.0 - complete rewrite. > > | > > | > > | Sun Donates Tomcat 3.0 > > | (which was a white elephant of sorts) > > | > > | Plans for JServ 2.0 discontinued > > | > > | > > | Tomcat 3.1 > > | > > | Tomcat 3.2 > > | > > | Plans for JServ 2.0 revised/reincarnated as Tomcat 4.0 > > | > > | Some dissenters from the Tomcat 4.0 (complete rewrite/redesign) > > | create Tomcat 3.3 (refactoring, incremental improvement over 3.2) > > | > > | Tomcat 4.0 born > > | > > | Several bugfixes later you can even run Tomcat 4.04 and have it > > | actuall work! > > | > > | Tomcat 4.1 development starts > > > > Oracle chose to not upgrade to Tomcat at any point in the last 4 years > > > > > > > Adam Weed > > > > > > -----Original Message----- > > > From: Laubach, Shawn - TAFB/LAB NCC (SAIC) > > > [mailto:[EMAIL PROTECTED]] > > > Sent: Saturday, July 06, 2002 8:51 AM > > > To: 'POI Users List' > > > Subject: RE: IllegalMonitorStateException > > > > > > > > > This is running under Oracle 9ias Rel. 1 so > > > > > > 1. A 1.2.1 version is what they say the are completely compatible > with. > > > 2. JServ 1.1 (Don't have a choice in this) > > > 3. Win2k fully patched > > > 4. P4 1.4 1gig 2x36gig SCSI Hardrives > > > > > > I went back to the 1.5 version of POI and it reacted the same. > > > > > > Shawn Laubach > > > SAIC - Web Developer > > > B-1B System Support Management Division > > > OC-ALC/LAB, Building 3001, Tinker AFB, Oklahoma > > > dsn: 336-2473 comm: 405-736-2473 mobile: 405-245-9562 > > > > > > > > > -----Original Message----- > > > From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, July 05, 2002 10:34 PM > > > To: POI Users List > > > Subject: Re: IllegalMonitorStateException > > > > > > > > > Thats a threading error. POI isn't threaded. That totally makes no > > > sense. I bet its a cooincidence as to where its > > > happening. Please provide: > > > > > > 1. JDK version > > > 2. Servlet container version > > > 3. OS version > > > 4. Hardware statistics. > > > > > > -Andy > > > > > > Shawn Laubach wrote: > > > > > > >Inside a class being called by a servlet, I'm getting a > > > >IllegalMonitorStateException thrown. I've narrowed it down to three > > lines > > > >of code where it is occuring. A row.createCell, cell.setCellValue, > and > > > >cell.setCellStyle calls. I haven't had time to narrow it down any > > furthur. > > > >What I'm curious about, is why it would be thrown anyways. I've just > > > >started using the 1.8 dev release and I plan to try the 1.7 release > next > > > >chance to see if that works. > > > > > > > >BTW, it runs fine standalone and other similar code runs fine both > > > >standalone and as a servlet. > > > > > > > >Shawn > > > > > > > > > > > >-- > > > >To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > >For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > > > > -- > > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > -- > > http://www.superlinksoftware.com - software solutions for business > > http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in > > Java > > http://krysalis.sourceforge.net/centipede - the best build/project > > structure > > a guy/gal could have! - Make Ant simple on complex > > Projects! > > The avalanche has already started. It is too late for the pebbles to > > vote. > > -Ambassador Kosh > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- > http://www.superlinksoftware.com - software solutions for business > http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in > Java > http://krysalis.sourceforge.net/centipede - the best build/project > structure > a guy/gal could have! - Make Ant simple on complex Projects! > The avalanche has already started. It is too late for the pebbles to > vote. > -Ambassador Kosh > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
