diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-04-12 17:32:00 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-04-12 17:32:00 +0000 |
commit | b764fe6ce04b1367522a20a518933cca3ae54c66 (patch) | |
tree | 9334709074a791244c90a5ea78240ba930a93524 /cppe/demo/IceE/chat/ChatClientDlg.cpp | |
parent | Fix (diff) | |
download | ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.bz2 ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.xz ice-b764fe6ce04b1367522a20a518933cca3ae54c66.zip |
Added createObjectAdapterWithRouter
Diffstat (limited to 'cppe/demo/IceE/chat/ChatClientDlg.cpp')
-rw-r--r-- | cppe/demo/IceE/chat/ChatClientDlg.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cppe/demo/IceE/chat/ChatClientDlg.cpp b/cppe/demo/IceE/chat/ChatClientDlg.cpp index d80e48878ea..1116e58c35f 100644 --- a/cppe/demo/IceE/chat/ChatClientDlg.cpp +++ b/cppe/demo/IceE/chat/ChatClientDlg.cpp @@ -56,12 +56,6 @@ CChatClientDlg::CChatClientDlg(const Ice::CommunicatorPtr& communicator, const L _port("10005") { _hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - - // - // Create the OA. - // - _adapter = _communicator->createObjectAdapterWithEndpoints("Chat.Client", ""); - _adapter->activate(); } CChatClientDlg::~CChatClientDlg() @@ -349,10 +343,12 @@ CChatClientDlg::OnLogin() // _chat = ChatSessionPrx::uncheckedCast(_router->createSession(user, password)->ice_router(_router)); - // - // Add the new router to the object adapter. - // - _adapter->addRouter(_router); + + // + // Create the OA. + // + _adapter = _communicator->createObjectAdapterWithRouter("Chat.Client", _router); + _adapter->activate(); // // Create the callback object. This must have the @@ -416,7 +412,7 @@ CChatClientDlg::OnLogin() AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); } - _adapter->removeRouter(_router); + _adapter->destroy(); _router = 0; } |