Archived

This forum has been archived. Please start a new discussion on GitHub.

two questions

1. is there any limit to the size of parameter? when I pass a parameter by ice, ice throws the exception of memory limit exceed if the parameter's size up to 1048547, why?


2. I want to implement a objects pool with ice, but the objects in pool each one has different status, so I should make clients can invoke the objects which they invoked before, may I implement this kind of pool with any utility of ice or I should implement it by myself?

thanksð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð@

Comments

  • about the question 1, I set the MessageSizeMax to 2048, then I can get the right value of it with getProperty, but the exception is still, :(
  • Perhaps the request is larger than 2MB, and you need to set the limit even higher?

    You can trace requests and request sizes with --Ice.Trace.Protocol=1 and --Ice.Trace.Network=2.

    Also not that you must set Ice.MessageSizeMax before Ice is initialized.

    Sorry, but I don't understand the 2nd question.
  • thanks marc

    about the question 1, the size of request is still 1048547, and I set parameter by c:\server --Ice.MessageSizeMax = 2048 , it is right? but the exception is still. than I will try trace more, thanks

    about the question 2, sorry for my poor english, my means is I want to implement a object, which supply connection to database, but as you know, each connection object has its context, so I should have some mechanism to identity each one, I know ice can implement obejct pool by itself simply ,but if the object each one has own status, could I implement this pool by ice still, or I should implement it by myself?
    I know I can implement this pool by myself, but I just want to know more about ice , :)
  • Originally posted by simpley
    thanks marc

    about the question 1, the size of request is still 1048547, and I set parameter by c:\server --Ice.MessageSizeMax = 2048 , it is right? but the exception is still. than I will try trace more, thanks

    You need to set --Ice.MessageSizeMax for both client and server.

    about the question 2, sorry for my poor english, my means is I want to implement a object, which supply connection to database, but as you know, each connection object has its context, so I should have some mechanism to identity each one, I know ice can implement obejct pool by itself simply ,but if the object each one has own status, could I implement this pool by ice still, or I should implement it by myself?
    I know I can implement this pool by myself, but I just want to know more about ice , :)

    Sorry, I'm also having trouble understanding what it is you want to do...

    So, you have a number of objects in the server, each with its own connection to some data store. I assume that client requests must be directed to the correct object, depending on what particular bit of state the client wants to update? I'm sorry, but I'm afraid I need more detail about exactly what you are trying to do.

    Cheers,

    Michi.
  • thanks michi first

    yeah, of course I set the Ice.MessageSizeMax both client and server, and I set Ice.Trace.Protocol=1 too, but I do not get more available info yet.

    about question2, in fact, I want to imlement a connection object pool, this kind of object can connect to different DBMSs , so it has own context about the special DBMS which it connect to, so I should have the clients can use the same object in one session, so if I manager this poor by myself, of course I can, but I wonder to know may I implement this kind of object by ice's object pool directly?
  • bernard
    bernard Jupiter, FL
    Hello,

    Regarding question 2, what are your constraints?
    • Threads tied to database connections
      In order to process several operations with the same connection, you need to reuse the same dispatch thread. This is typically what happens with XA in multi-threaded mode.
    • Database connection objects usable by any threads
      In the implementation of your operation, you need to grap the desired connection from some connection pool. Ice does not provide a generic connection pool ... you'd have to write your own.

    Cheers,
    Bernard