summaryrefslogtreecommitdiff
path: root/TAO/examples
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-03-13 17:32:43 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-03-13 17:32:43 +0000
commit9551bf40b239c7a59d405bbac984f48f6f556ebe (patch)
tree5d118cb51468a6c8f5746853b905208a193b492c /TAO/examples
parent7cddfd814db62d1bcc1a4f8be3c73e53995297de (diff)
downloadATCD-9551bf40b239c7a59d405bbac984f48f6f556ebe.tar.gz
ChangeLogTag: Tue Mar 13 18:24:27 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/examples')
-rw-r--r--TAO/examples/PluggableUDP/tests/Basic/client.cpp7
-rw-r--r--TAO/examples/PluggableUDP/tests/Basic/server.cpp7
-rw-r--r--TAO/examples/Simple/grid/Grid_i.cpp13
-rw-r--r--TAO/examples/Simple/time-date/Time_Date.cpp13
4 files changed, 36 insertions, 4 deletions
diff --git a/TAO/examples/PluggableUDP/tests/Basic/client.cpp b/TAO/examples/PluggableUDP/tests/Basic/client.cpp
index db74e8d9563..4e4b487c01a 100644
--- a/TAO/examples/PluggableUDP/tests/Basic/client.cpp
+++ b/TAO/examples/PluggableUDP/tests/Basic/client.cpp
@@ -120,8 +120,13 @@ main (int argc, char *argv[])
// let it remember our ORB
udp_i.orb (orb.in ());
+ PortableServer::ObjectId_var id =
+ root_poa->activate_object (&udp_i);
+
+ CORBA::Object_var object_act = root_poa->id_to_reference (id.in ());
+
UDP_var udpHandler_var =
- udp_i._this ();
+ UDP::_narrow (object_act.in ());
// Instantiate client
UDP_Client_i *client = new UDP_Client_i (orb.in (),
diff --git a/TAO/examples/PluggableUDP/tests/Basic/server.cpp b/TAO/examples/PluggableUDP/tests/Basic/server.cpp
index b9797f81548..b3809af34e0 100644
--- a/TAO/examples/PluggableUDP/tests/Basic/server.cpp
+++ b/TAO/examples/PluggableUDP/tests/Basic/server.cpp
@@ -150,8 +150,13 @@ main (int argc, char *argv[])
udpHandler_i.orb (orb.in ());
+ PortableServer::ObjectId_var id_act =
+ persistent_poa->activate_object (&udpHandler_i);
+
+ CORBA::Object_var object_act = persistent_poa->id_to_reference (id_act.in ());
+
UDP_var udpHandler_var =
- udpHandler_i._this ();
+ UDP::_narrow (object_act.in ());
// Instantiate client
UDP_Client_i* client = new UDP_Client_i (orb,
diff --git a/TAO/examples/Simple/grid/Grid_i.cpp b/TAO/examples/Simple/grid/Grid_i.cpp
index ac8bd324bd9..a15811675ba 100644
--- a/TAO/examples/Simple/grid/Grid_i.cpp
+++ b/TAO/examples/Simple/grid/Grid_i.cpp
@@ -177,6 +177,17 @@ Grid_Factory_i::make_grid (CORBA::Short width,
CORBA::NO_MEMORY ());
// Register the Grid pointer.
- Grid_ptr gptr = grid_ptr->_this ();
+ CORBA::Object_var poa_object =
+ this->orb_->resolve_initial_references("RootPOA");
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ());
+
+ PortableServer::ObjectId_var id =
+ root_poa->activate_object (grid_ptr);
+
+ CORBA::Object_var object = root_poa->id_to_reference (id.in ());
+
+ Grid_ptr gptr = Grid::_narrow (object.in ());
return gptr;
}
diff --git a/TAO/examples/Simple/time-date/Time_Date.cpp b/TAO/examples/Simple/time-date/Time_Date.cpp
index e2a7aab8d18..4d2c545d02c 100644
--- a/TAO/examples/Simple/time-date/Time_Date.cpp
+++ b/TAO/examples/Simple/time-date/Time_Date.cpp
@@ -186,8 +186,19 @@ Time_Date_Servant::init (int argc, char *argv[])
Time_Date_i * servant = new Time_Date_i;
PortableServer::ServantBase_var safe_servant = servant;
+ CORBA::Object_var poa_object =
+ orb->orb_->resolve_initial_references("RootPOA");
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ());
+
+ PortableServer::ObjectId_var id =
+ root_poa->activate_object (servant);
+
+ CORBA::Object_var object = root_poa->id_to_reference (id.in ());
+
CORBA::Object_var obj =
- servant->_this ();
+ CORBA::Object::_narrow (object.in ());
CORBA::String_var str =
orb->orb_->object_to_string (obj.in ());