Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / DevGuideExamples / PortableInterceptors / Auth / ServerInitializer.cpp
blob15c6a26e26f16e9c11381de22bb87a02ceaae1fa
1 #include "ServerInitializer.h"
2 #include "ServerInterceptor.h"
4 #if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY == 1)
5 #include <iostream>
6 #else
7 #include <iostream.h>
8 #endif
10 ServerInitializer::ServerInitializer ()
14 void
15 ServerInitializer::pre_init (
16 PortableInterceptor::ORBInitInfo_ptr)
20 void
21 ServerInitializer::post_init (
22 PortableInterceptor::ORBInitInfo_ptr info)
25 // Create and register the request interceptors.
26 PortableInterceptor::ServerRequestInterceptor_ptr si =
27 PortableInterceptor::ServerRequestInterceptor::_nil ();
29 try
31 si = new ServerInterceptor ();
33 catch(...)
35 std::cerr << "Exception occurred trying to create ServerInterceptor." << std::endl;
38 PortableInterceptor::ServerRequestInterceptor_var si_interceptor =
39 si;
41 info->add_server_request_interceptor (si_interceptor.in ());