Kbase P34464: Using Open Client Toolkit proxies in a Java Servlet to talk to the AppServer and receiving errors 81
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  03/02/2009 |
|
Status: Verified
SYMPTOM(s):
Using Open Client Toolkit proxies in a Java Servlet to talk to the AppServer
Proxies are being instantiated in the Java Servlets init method
ServerSocketsIPC <operation> IOException : <IOException_string> : <IOExceptionMsg_string> (8127)
ServerSocketsIPC read() IOException : java.io.EOFException : NULL (8127)
ServerIPCException in <funcName> : <ServerIPCException_string>. (8119)
ServerIPCException in getServerIPCMsg() : ServerIPC error. (8119)
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
CAUSE:
The Java servlets init method is called only once (when the first instance of the servlet is loaded into memory) and all subsequent instances (i.e. threads) are using the one instance of the proxy object. The Open Client Toolkit proxies cannot be used in this manner. Only one call to the AppServer can be active at any one time and, by default, the Java Servlet will make calls from many threads at the same time.
FIX:
Implement connection pooling for the Open Client Toolkit proxy objects or synchronize access to the proxy across all threads (synchronizing access is not recommended if you expect your Servlet to handle any kind of load).
If you are using a newer version of the AppServer where the state-free operating mode is available, you can use this mode by setting the sessionModel attribute of the Progress Connection object to 1. This will implement connection pooling for you.