Skip to main content

When writing a thick client application that uses the K2ROM, what are the recommended methods of dealing with state?  (Ignoring questions of user authentication/security for the moment.)

  • Connect to the server and leave the connection open
  • Stateless - connect as needed and disconnect ASAP

Is there any penalty for keeping dozens of connections open for indefinite periods of time?

If instead we go stateless, can we safely store references to WorklistItems, disconnect, reconnect later, and use those same .NET objects to open items, etc.?  Is it necessary to retrieve new WorklistItems via the SerialNumbers of the old ones?

Thanks! 

Hi there.


As for the multiple connections to K2 server it is recommended that you do not keep dozens of connections open for indefinte periods. This is similar to typical SQL server connections. You want to either reuse a connection, or close a connection if you are not using immediately.


As for the worklist item seperated from the connection... i have not actually used it in this manner but i believe you would have to get a new worklist based on the serial number since the worklist is retrieved from the k2connection object.


hth


Thank you!

Reply