Hello i got a problem using Apache-Tomcat v6.0.29.
The Problem
My application uses apache tomcat for the java-flex comunication… everithing goes fine most of the time… but sometimes when i call a java function from flex 3 (a function that most of the time works fine)… Tomcat GETS FROZEN.
Example (EDIT)
1- Start tomcat (works)
2- run flex program (works)
3- call the java function downloadLiveViewPicture() (works great)
…
I download lots of live view pictures from a camera and take pictures and re start the live view downloads and everuthing works fine… i call functions form java lile takePicture(), or execute in java sql querys form my database…
…
4- do something else… (works)
5- call the same java function (sometimes works and sometimes not)
When i go to the main view of my flex app, i i try to re start the downloadLV nothings happen, even if the procedure i use in this point is the same i use and works on point 3…
Environment
Backend Java
FrontEnd Flex aplication
Between tjhe: Apache Tomcat v6.0.29
Solution attempts
I tried closing tomcat and re opening it after calling again the Java function (Step 5 of example) it works, but this solution is not a viable solution.
At least i want to make it using a java method which closes and re opens the tomcat. I tried using the taskkill comand but it doesnt work…
The other thing that i realized is that if i wait a minute before calling the java function from flex… there is a greater probability that the function will work…
Thanks!!!
Finnaly find the problem:
I am using a Camera wich supports only one session simultaneously and TomCat creates new java Threads when i call TomCat from the Flex app. So every thread which wants to interact with the cam get the TomCat frozen if the is another thread interacting with the cam.
Is not a solution buy a good man said: “If you find the problem, you almost find the solution”.
So i would have to deal with the one-session problem…