If notifyAll() was never called, then the object that held the lock on the
Action class never released it, so all future calls to the execute method on
your action would block waiting for the lock to be released. The action
wasn't hosed in any way. The problem was the object that never released the
lock.

-----Original Message-----
From: Whitmire, Jeffrey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:00 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionServlet Action caching problem


Thanks guys, you are right (of course).  I was so focused on the fact that
only one instance is created, I was losing site of the forest for the trees.
As long as there are no instance variables (which there are not) then
everything should work as planned and only one instance is all you ever
need.

I'm still curious though.  When I was having the problem, it was because an
uncaught exception was skipping the call to notifyAll to wake up the action
which was blocked until job completion.  This seemed to hose the instance of
the action such that no future requests for that action responded.  The rest
of the app worked perfectly fine, but that action never responded until the
app was restarted.  Unless I'm totally off my rocker (more likely than not),
other threads calling that action should still have worked.

Sometimes threading can really make your brain go fuzzy.

Jeff.

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

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

Reply via email to