[omniORB] Re: Howto bidir omniNotify and Event PushConsumer

M300_林錦龍處長 edward_lin@iwin.com.tw
Tue Apr 29 12:10:02 2003


Hi, all

I fixed the problem.
Because I wrote bad push consumer cause OA shift into HOLD state and reject
all incoming messages.

I modified 'omniNotify/include/omniorb_poa_wrappers_impl.h' file, although
the modification was ugly, it did work.

void WRAPPED_ORB_OA::init(int &argc, char** argv) {
// skip what I'm not interested
// original
// _poa = PortableServer::POA::_narrow(obj); // comment out this line
// my modification
  _rootPoa = PortableServer::POA::_narrow(obj);
  PortableServer::POAManager_var pman = _rootPoa->the_POAManager();
  pman->activate();
  _poa_activated = 1;
  CORBA::PolicyList pl;
  pl.length(1);
  CORBA::Any a;
  a <<= BiDirPolicy::BOTH;
  pl[0] = _orb->create_policy(BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,a);
  _poa = _rootPoa->create_POA("bidir",pman.in(), pl);
// end of modification
}

Cheers,
Edward

----- Original Message -----
From: "M300_林錦龍處長" <edward_lin@iwin.com.tw>
To: <omniorb-list@omniorb-support.com>
Sent: Tuesday, April 29, 2003 11:55 AM
Subject: [omniORB] Re: Howto bidir omniNotify and Event PushConsumer


> Hi, all and thank to Thomas Amsler!
>
> I know a pull consumer can solve this problem (since it's a corba client);
I
> use the push-style to receive realtime stock information, I'm afraid it's
a
> hard work to tune the priority of pull consumer.
>
> In order not to pollute the traffic, I put the log of tracelevel 25 to my
> website. Sorry, I can't see the point of failure.
>
> 1. notifd log,  with a real IP consumer and supplier running
> http://www.sonar.idv.tw:7716/notify_real_consumer_ok.txt
>
> 2. real IP consumer log
> http://www.sonar.idv.tw:7716/real_consumer_ok.txt
>
> 3. notifd log, with a real IP supplier and a virtual IP consumer running
> http://www.sonar.idv.tw:7716/notify_virtual_consumer_failure.txt
>
> 4. virtual IP consumer log
> http://www.sonar.idv.tw:7716/virtual_consumer_failure.txt
>
> Thanks in advance.
>
> Cheers,
> Edward
>
>
>
> > Hi, dear all and Ducan,
> >
> > Do anyone have experience about howto bidir omniNotify and PushConsumer?
> > I modified omniNotify/include/omniorb_poa_wrappers_impl.h as the
following
> > code fragmentation.
> > replace
> >     _poa = PortableServer::POA::_narrow(obj);
> > as
> >     _rootPoa = PortableServer::POA::_narrow(obj);
> >     CORBA::PolicyList pl;
> >     pl.length(1);
> >     CORBA::Any a;
> >     a <<= BiDirPolicy::BOTH;
> >     pl[0] =
_orb->create_policy(BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,a);
> >     _poa = rootPoa->create_POA("omniNotify",
> > PortableServer::POAManager::_nil(), pl);
> >
> > My purpose is let the OA of omniNotify supports BiDir policy.
> >
> > My problem is I have an omniNotify daemon resides on real IP, say
> > 202.39.xxx.yyy; and an Event PushConsumer resides on virtual IP behind
> > firewall, say 192.168.sss.ttt. I set both configuration files (202. and
> > 192.) to
> >     clientTransportRule * = tcp,bidir
> >     offerBidirectionalGIOP = 1
> >     serverTransportRule * = tcp,bidir
> >     acceptBidirectionalGIOP = 1
> >
> > but the PushConsumer never got any event pushed!
> >
> > When I 'netstat' machine for omniNotify, it always tell me
> > 202.39.xxx.yyy:omniNotify     192.168.sss.ttt:8888  SYN_SENT.
> >
> > Of course, it is wrong, could anyone tell me howto do or configure?
> >
> > If anyone need omniORB trace, please let me know.
> >
> > Thanks in advance.
> >
> > (I use omniORB4 on both machines, they are Linux 7.3)
> >
> > Cheers,
> > Edward
> >
> >
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>