69#if defined(HAVE_OMNIORB4)
70 orb=CORBA::ORB_init(argc,argv,
"omniORB4");
72 orb=CORBA::ORB_init(argc,argv,
"omniORB3");
78 while((c =
getopt(argc,argv,
"h")) != EOF)
82 case 'h':
usage(argc,argv);
85 default :
usage(argc,argv);
99 const char* action =
"start";
102 using namespace CosEventChannelAdmin;
104 action=
"convert URI into reference to source channel";
107 action=
"convert URI into reference to destination channel";
110 action=
"obtain ConsumerAdmin";
111 ConsumerAdmin_var cadmin =from_channel->for_consumers();
113 action=
"obtain ProxyPushSupplier";
114 ProxyPushSupplier_var supplier =cadmin->obtain_push_supplier();
116 action=
"obtain SupplierAdmin";
117 SupplierAdmin_var sadmin =to_channel->for_suppliers();
119 action=
"obtain ProxyPushConsumer";
120 ProxyPushConsumer_var consumer =sadmin->obtain_push_consumer();
122 action=
"connect PushConsumer";
123 consumer->connect_push_supplier(supplier.in());
125 action=
"connect PushSupplier";
126 supplier->connect_push_consumer(consumer.in());
130 action=
"destroy orb";
138 catch(CORBA::TRANSIENT& ex) {
139 cerr<<
"Failed to "<<action<<
". TRANSIENT"<<endl;
141 catch(CORBA::OBJECT_NOT_EXIST& ex) {
142 cerr<<
"Failed to "<<action<<
". OBJECT_NOT_EXIST"<<endl;
144 catch(CORBA::SystemException& ex) {
145 cerr<<
"Failed to "<<action<<
".";
146#if defined(HAVE_OMNIORB4)
147 cerr<<
" "<<ex._name();
148 if(ex.NP_minorString())
149 cerr<<
" ("<<ex.NP_minorString()<<
")";
153 catch(CORBA::Exception& ex) {
154 cerr<<
"Failed to "<<action<<
"."
155#if defined(HAVE_OMNIORB4)