can i create servant instance from shared library?help!
I tried to create servant instance from shared library like:
----------------------------------------------------
typedef Ice::Object* (*T_COMPONENT_FACTORY)();
...
IceInternal::DynamicLibraryPtr library
= new IceInternal::DynamicLibrary();
IceInternal::DynamicLibrary::symbol_type symbol
= library->loadEntryPoint(entryPoint, false);
T_COMPONENT_FACTORY factory = (T_COMPONENT_FACTORY)symbol;
Ice::ObjectPtr component = factory();
_adapter->add(component, Ice::stringToIdentity(identityStr));
---------------------------------------------------
but while the client calling the servant's method, it failed:
client:
---------
.\TcpTransceiver.cpp:283: Ice::ConnectionLostException:
connection lost: WSAECONNRESET
server:
--------
[ Service_D: Network: accepted tcp connection
local address = 10.10.10.75:10000
remote address = 10.10.10.75:2318 ]
Service_D: warning: connection exception:
.\ConnectionI.cpp:2133: Ice::UnknownException:
unknown exception:
unknown c++ exception
local address = 10.10.10.75:10000
remote address = 10.10.10.75:2318
[ Service_D: Network: closing tcp connection
local address = 10.10.10.75:10000
remote address = 10.10.10.75:2318 ]
------------
can i do like this?! Thanks for your help!
|