#include <Server_Main.h>
List of all members.
Detailed Description
template<typename SERVANT>
class TAO::Utils::Server_Main< SERVANT >
Definition at line 70 of file Server_Main.h.
Constructor & Destructor Documentation
template<typename SERVANT >
TAO::Utils::Server_Main< SERVANT >::Server_Main |
( |
const char * |
name |
) |
|
template<typename SERVANT >
template<typename SERVANT >
Member Function Documentation
template<typename SERVANT >
template<typename SERVANT >
int TAO::Utils::Server_Main< SERVANT >::run |
( |
int |
argc, |
|
|
ACE_TCHAR * |
argv[] | |
|
) |
| | |
Definition at line 42 of file Server_Main.cpp.
{
int result = 0;
ACE_Argv_Type_Converter command_line (argc, argv);
ACE_TCHAR ** asciiArgv = command_line.get_TCHAR_argv ();
try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc, asciiArgv, name_);
if (! ::CORBA::is_nil(orb.in ()))
{
SERVANT servant;
result = servant.parse_args (argc, asciiArgv);
if (result == 0)
{
result = servant.init (orb.in ());
if (result == 0)
{
ACE_ERROR ((LM_INFO,
"%T %s (%P|%t) Ready %s\n", name_, servant.identity ()
));
ACE_Time_Value tv (1,0);
orb->run (tv);
int quit = 0;
while (result == 0 && ! quit )
{
ACE_Time_Value work_tv (1,0);
orb->perform_work(work_tv);
quit = servant.idle (result);
}
servant.fini ();
orb->shutdown (1);
ACE_ERROR ((LM_INFO,
"%T %s (%P|%t) Terminated normally. %s\n",
name_,
servant.identity ()
));
}
else
{
ACE_ERROR ((LM_ERROR,
"%T %s (%P|%t) Registration failed: %m\n", name_
));
result = -1;
}
}
else
{
ACE_ERROR ((LM_ERROR,
"%T %s (%P|%t) ORB manager init failed\n", name_
));
result = -1;
}
}
}
catch (const ::CORBA::Exception& ex)
{
ex._tao_print_exception (name_);
result = -1;
}
return result;
}
Member Data Documentation
template<typename SERVANT >
const char* TAO::Utils::Server_Main< SERVANT >::name_ [private] |
The documentation for this class was generated from the following files: