On 11/08/2003 17:50 Nathan Rogers wrote:
I am using Struts 1.1 along with the Velocity tools to develop a fairly simple servlet (there are probably going to be no more than twenty actions total)

The problem that I am facing is a deadlock situation where Tomcat simply refuses to respond to any new requests and just stalls. I think it may be due to some code in the model where I am using PreparedStatements (which are declared as synchronized).

How do you conclude that PreparedStatement has synchronized methods? I've looked through the source for PreparedStatement (JDK 1.4.1) and can see no synchronized methods. This aside, how do you conclude that executing a synchronized method on two different objects of the same class would put one into a wait state (given that they will use different monitors)?


Has anyone else run into a similar problem where the Struts framework takes an unreasonably long time to handle a request due to synchronized methods? Is there any workaround, other than only using Statements in my model?

I think you're barking up the wrong tree here. You're either getting deadlocks in your database or you've got some dirty code in there that breaks thread safety.
-- Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to