This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
i have a special problem, perhaps an understanding problem, but i am sure, you can help me.
I did get a working java program, that contains complex multithreading control. It´s running under Java 1.4 on a WIN Server. That program run since years. Since it must work 'hardly', sometimes problems appears, respectively it was always there, but there are not catch to so.´s eyes. And the pro
plems 'sometimes' are the bad ones.
During the running program it starts multiple threads.
The OS controls the threads.
I localized the problem. Sample the program starts 2 threads.
In a function will save into db with hibernate. After that, data will be save into file system with a own written java component. This 2 calls happen in this one function.
Mostly and when it run´s normal there is no thread change. The 2 calls happen in milliseconds. All things are ok.
Sometimes the OS means to give thread 2 ressources.
The change of the thread happen between the 2 calls. It takes on WIN XP (2 Processors) about ,002 sec., on WIN Server 2003 (2 Proz.) betqween 1-1,5 sec. and on an HP power computer with WIN 2003 Server (4 Proc) 6 sec!!!???
Then it can happen, that between save data into db and save data into filesystem from thread 1 in the function, can be about 10 sec.!!!??? Often the function will save 5.000 times and then this function needs not 10 sec. but 30.000 sec. !!!