tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Rosenberg <rosenberg.l...@googlemail.com>
Subject Re: Tomcat 100% CPU usage after moving from Java 5 to 6
Date Mon, 25 Jan 2010 13:01:20 GMT
Hello Jesse,

is the Workflow re-intrant? If yes:

this is odd:

you are iterating in a re-intrant action (i assume the action is
re-intrant) over a shared variable?
	  Vector vecOids = new Vector();
....
in the method:
		  Iterator oidIterator = vecOids.iterator();
		  while (oidIterator.hasNext())
		  {
		    //System.out.println("Workflow/doAction: oid=" +
((ObjectId)oidIterator.next()).getKey());
		  }
and you are modifying this vector at multiple places in the same class.

You should probably unit-test this code for concurrency.

regards
Leon


On Mon, Jan 25, 2010 at 1:41 PM, Jesse Klaasse <jesse.klaasse@indicia.nl> wrote:
>
>
> Jesse Klaasse wrote:
>>
>> Those Workflow and DQWorkflow classes are from our company, written by the
>> programmer who worked on this project before me. I have attached the two
>> files for further examination.
>> I have noticed the performWorkflowAction method in DQWorkflow is not
>> synchronized and uses Vectors and Iterators. Could this be a possible
>> problem? Even though this all has been working perfectly fine in Java 4
>> and 5?
>>
>
> I forgot the attachments, sorry!
> http://old.nabble.com/file/p27306041/DQWorkflow.java DQWorkflow.java
> http://old.nabble.com/file/p27306041/Workflow.java Workflow.java
> --
> View this message in context: http://old.nabble.com/Tomcat-100--CPU-usage-after-moving-from-Java-5-to-6-tp27305110p27306041.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message