[omniORB] [omniORB]How do I bind to ORB(Visibroker)?

Mohan rmohan@ice-com.com
Mon Jun 24 08:25:01 2002


This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C21B7E.0161C890
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I have an ORB(on the server) that has a POA created with name /myorb1 by =
poa-manager from rootPOA.

For example(Visibroker Server):

    CORBA::ORB_var orb =3D CORBA::ORB_init(argc, argv);
    CORBA::Object_var obj =3D =
orb->resolve_initial_references("RootPOA");
    PortableServer::POA_var rootPOA =3D =
PortableServer::POA::_narrow(obj);

    // get the POA Manager
    PortableServer::POAManager_var poa_manager =3D =
rootPOA->the_POAManager();

    // Create myPOA with the right policies
    PortableServer::POA_var myPOA =3D =
rootPOA->create_POA("datacollection_agent_poa",=20
                                                        poa_manager,
                                                        policies);


=20

1. From the client side(using Visibroker) I obtain the ObjectID of the =
poa-maager and then locate its poa by passing its name /mobr1 in the =
_bind function

For Example(Visbroker client):
    CORBA::ORB_var orb =3D CORBA::ORB_init(argc, argv);
     cout << "ORB initialized..." << endl;

 _BRDTRACE(m_fp, "Retrieving ObjectID...\n");
  PortableServer::ObjectId_var managerId =3D=20
                        =
PortableServer::string_to_ObjectId("DataCollectionManager");

    DataCollection::ServerManager_var manager =3D=20
                  =
DataCollection::ServerManager::_bind("/datacollection_agent_poa", =
managerId);

.=20
2. Now what I want to do is to bind to that ORB and call one of its =
interfaces using omniORB. What is the best way to do this? Are there any =
 good examples?=20
In omni I noticed from one of its examples that ORB's created using omni =
can esatablish a commnincation thru Name Service and I found no other =
examples that just creates a poa from the root poa that can be used to =
bind from vairious clients.

Thanks,

regards
Ram

------=_NextPart_000_003A_01C21B7E.0161C890
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have an ORB(on the server) that has a =
POA created=20
with name /myorb1 by poa-manager from rootPOA.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>For example(Visibroker=20
Server):</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; CORBA::ORB_var orb =
=3D=20
CORBA::ORB_init(argc, argv);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; CORBA::Object_var =
obj =3D=20
orb-&gt;resolve_initial_references("RootPOA");<BR>&nbsp;&nbsp;&nbsp;=20
PortableServer::POA_var rootPOA =3D=20
PortableServer::POA::_narrow(obj);<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; // get the POA=20
Manager<BR>&nbsp;&nbsp;&nbsp; PortableServer::POAManager_var poa_manager =
=3D=20
rootPOA-&gt;the_POAManager();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; // Create myPOA with =
the right=20
policies<BR>&nbsp;&nbsp;&nbsp; PortableServer::POA_var myPOA =3D=20
rootPOA-&gt;create_POA("datacollection_agent_poa",=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
poa_manager,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
policies);<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1. From the client side(using =
Visibroker) I obtain=20
the ObjectID of the poa-maager and then locate its poa by passing its =
name=20
/mobr1 in the _bind function</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>For Example(Visbroker=20
client):</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; CORBA::ORB_var orb =
=3D=20
CORBA::ORB_init(argc, argv);<BR>&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; =
"ORB=20
initialized..." &lt;&lt; endl;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;_BRDTRACE(m_fp, "Retrieving=20
ObjectID...\n");<BR>&nbsp; PortableServer::ObjectId_var managerId =3D=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
PortableServer::string_to_ObjectId("DataCollectionManager");<BR><BR>&nbsp=
;&nbsp;&nbsp;=20
DataCollection::ServerManager_var manager =3D=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
DataCollection::ServerManager::_bind("/datacollection_agent_poa",=20
managerId);<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. Now what I want to do is to bind to =
that ORB=20
and&nbsp;call one of its interfaces using&nbsp;omniORB.&nbsp;What is the =
best=20
way to do this?&nbsp;Are there any  good examples? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In omni I noticed from one of its =
examples that=20
ORB's created using omni can esatablish a commnincation thru Name =
Service and I=20
found no other examples that just creates a poa from the root poa that =
can be=20
used to bind from vairious clients.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Ram</FONT></DIV></BODY></HTML>

------=_NextPart_000_003A_01C21B7E.0161C890--