> 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

Reply via email to