two questions

simpleysimpley Member ✭✭
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

  • simpleysimpley Member ✭✭
    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, :(
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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.
  • simpleysimpley Member ✭✭
    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 , :)
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in 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.
  • simpleysimpley Member ✭✭
    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?
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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
Sign In or Register to comment.