Archived
This forum has been archived. Please start a new discussion on GitHub.
Setting Ice.MessageSizeMax value doesn't effective
Dear Staff:
I use ice sequence<byte> transfer some large size file Content.
When I transfer File which Size larger 1MB,client catched the "MemoryLimitException" Exception.
So I used the Following Code to set Ice.MessageSizeMax value in client and server source:
Client:
Ice::PropertiesPtr properties = communicator()->getProperties();
properties->setProperty("Ice.MessageSizeMax", "10240");
Server:
Ice.ObjectAdapter adapter = communicator().createObjectAdapter(""); adapter.getCommunicator().getProperties().setProperty("Ice.MessageSizeMax", "10240");
adapter.add(new UpdateServerI(m_dbfArr, m_qm, m_form), communicator().stringToIdentity(UpdateConstant.ICE_IDENTITYNAME));
adapter.activate();
But only catched ConnectionLostException in Client.
It seems that there is something wrong with server Code,it close the connection.
Would you please to help me out of trouble,thanks in advance.
I use ice sequence<byte> transfer some large size file Content.
When I transfer File which Size larger 1MB,client catched the "MemoryLimitException" Exception.
So I used the Following Code to set Ice.MessageSizeMax value in client and server source:
Client:
Ice::PropertiesPtr properties = communicator()->getProperties();
properties->setProperty("Ice.MessageSizeMax", "10240");
Server:
Ice.ObjectAdapter adapter = communicator().createObjectAdapter(""); adapter.getCommunicator().getProperties().setProperty("Ice.MessageSizeMax", "10240");
adapter.add(new UpdateServerI(m_dbfArr, m_qm, m_form), communicator().stringToIdentity(UpdateConstant.ICE_IDENTITYNAME));
adapter.activate();
But only catched ConnectionLostException in Client.
It seems that there is something wrong with server Code,it close the connection.
Would you please to help me out of trouble,thanks in advance.
0
Comments
-
You must set the value before you initialize the communicator.0