Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Big_Twoways / Peer.cpp
blob2024fb17cc67d28b0c638d563112d71254973c58
1 #include "Peer.h"
2 #include "Session.h"
4 Peer::Peer (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
9 Peer::~Peer ()
13 Test::Session_ptr
14 Peer::create_session (Test::Session_Control_ptr control,
15 CORBA::ULong payload_size,
16 CORBA::ULong thread_count,
17 CORBA::ULong message_count,
18 CORBA::ULong peer_count)
20 Session *session_impl = 0;
21 ACE_NEW_THROW_EX (session_impl,
22 Session (control,
23 payload_size,
24 thread_count,
25 message_count,
26 peer_count),
27 CORBA::NO_MEMORY ());
28 PortableServer::ServantBase_var transfer_ownership (session_impl);
30 return session_impl->_this ();
33 void
34 Peer::shutdown ()
36 ACE_DEBUG ((LM_DEBUG,
37 "(%P|%t) Peer::shutdown, waiting for threads\n"));
39 ACE_DEBUG ((LM_DEBUG,
40 "(%P|%t) Peer::shutdown, shutting down ORB\n"));
41 this->orb_->shutdown (false);