tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fraser, James" <James.Fra...@dsto.defence.gov.au>
Subject RE: Embedded tomcat and unit testing.. Tomcat either stops or my unit tests don't execute? [SEC=UNCLASSIFIED]
Date Wed, 15 Jun 2011 00:38:53 GMT
UNCLASSIFIED

I read that Apache use embedded Tomcat for unit testing. Are there any
examples floating around? 

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Wednesday, 15 June 2011 10:01 AM
To: Tomcat Users List
Subject: RE: Embedded tomcat and unit testing.. Tomcat either stops or
my unit tests don't execute? [SEC=UNCLASSIFIED]

> From: Fraser, James [mailto:James.Fraser@dsto.defence.gov.au]
> Subject: Embedded tomcat and unit testing.. Tomcat either stops or my 
> unit tests don't execute? [SEC=UNCLASSIFIED]

>         tomcat.enableNaming();
>         tomcat.start();
>         tomcat.getServer().await();       

> Without the line `tomcat.getServer().await();`, Tomcat simply stops;

As expected, since all of Tomcat's threads are daemons.

> with the line `tomcat.getServer().await();`, it looks as though the 
> thread blocks and my unit tests don't execute..

Not having used an embedded Tomcat, I can't really comment on what
you're missing.  You might first try diagnosing it by connecting to the
program (with the await() in place) via JConsole, and see what threads
are present.  Compare that with Tomcat running normally (not embedded).

 - Chuck 


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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


IMPORTANT: This email remains the property of the Department of Defence
and is subject to the jurisdiction of section 70 of the Crimes Act 1914.
If you have received this email in error, you are requested to contact
the sender and delete the email.


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


Mime
View raw message