39 # include <iostream.h>
42 #ifdef HAVE_STD_IOSTREAM
46 #include <omniEvents/EventChannel.h>
54 int main(
int argc,
char **argv)
58 CORBA::ORB_var
orb = CORBA::ORB_init(argc,argv);
60 const char* action=
"";
63 action=
"initialise OmniEvents::Orb";
68 action=
"activate the RootPOA's POAManager";
72 PortableServer::POAManager_var pman;
76 action=
"create EventChannel servant";
80 action=
"activate EventChannel servant";
86 action=
"obtain an object reference to the EventChannel";
87 CosEventChannelAdmin::EventChannel_var channelRef =channelSrv->_this();
91 action=
"stringify the EventChannel reference";
92 CORBA::String_var sior =orb->object_to_string(channelRef.in());
93 cout<<sior.in()<<endl;
95 action=
"set signal handlers";
99 action=
"collect orphan requests";
112 action=
"destroy orb";
116 catch(CORBA::SystemException& ex) {
117 cerr<<
"Failed to "<<action<<
".";
118 #if defined(HAVE_OMNIORB4)
119 cerr<<
" "<<ex._name();
120 if(ex.NP_minorString())
121 cerr<<
" ("<<ex.NP_minorString()<<
")";
126 catch(CORBA::Exception& ex) {
127 cerr<<
"Failed to "<<action<<
"."
128 #if defined(HAVE_OMNIORB4)