diff options
author | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-10-19 00:27:51 +0000 |
---|---|---|
committer | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-10-19 00:27:51 +0000 |
commit | b29e5800752ecefbe4e9317ac908e40d9c6eded0 (patch) | |
tree | 3bdec835860a692ca76bdcd5baa5f069645bf248 /TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp | |
parent | 189f1baf20ea719b1724adef186b8699706eb065 (diff) | |
download | ATCD-b29e5800752ecefbe4e9317ac908e40d9c6eded0.tar.gz |
Tue Oct 18 17:24:26 MST 2005 Yan Dai <dai_y@ociweb.com>
Diffstat (limited to 'TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp')
-rw-r--r-- | TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp b/TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp new file mode 100644 index 00000000000..8c3c4b192a0 --- /dev/null +++ b/TAO/examples/CSD_Strategy/ThreadPool/server_main.cpp @@ -0,0 +1,43 @@ +// $Id$ +#include "ServerApp.h" +#include "ace/Log_Msg.h" +#include "tao/Exception.h" + + +int +main(int argc, char* argv[]) +{ + ACE_LOG_MSG->priority_mask(LM_TRACE | + LM_DEBUG | + LM_INFO | + LM_NOTICE | + LM_WARNING | + LM_ERROR | + LM_CRITICAL | + LM_ALERT | + LM_EMERGENCY, + ACE_Log_Msg::PROCESS); + + ServerApp app; + + ACE_TRY_NEW_ENV + { + int ret = app.run(argc,argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + return ret == 1 ? 0 : ret; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Caught exception in main() for ServerApp"); + } + ACE_CATCHALL + { + ACE_ERROR((LM_ERROR, + "(%P|%t) Unknown (...) exception caught in main() " + "for ServerApp\n")); + } + ACE_ENDTRY; + + return 1; +} |