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.caldar...@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.fra...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to