Is anyone using the .Net openclient proxies against PASOE? I'm having concurrency troubles within the openclient when connecting to PASOE (even more than I did when connecting to classic appserver.)
Here is an example of a callstack (HTTPConnection.dontProxyFor) where I often encounter 'System.NullReferenceException' in Progress.o4glrt.dll. The exception typically comes up when using a session managed connection for the first time in an appdomain, and typically only happens if multiple threads are involved. I get these types of exceptions in certain other scenarios as well, but this one is a bit easier to explain.
If the exception is thrown, then the entire openclient will misbehave until the appdomain is cycled.
Progress.o4glrt.dll!Progress.UBroker.Util.HTTPConnection.dontProxyFor(string host) Progress.o4glrt.dll!Progress.UBroker.Client.HttpClientProtocol.setupProxyServer(Progress.UBroker.Util.HTTPConnection httpClient, object context) Progress.o4glrt.dll!Progress.UBroker.Client.HttpClientProtocol.newHttpConnection(object context) Progress.o4glrt.dll!Progress.UBroker.Client.HttpClientProtocol.openConnection(Progress.UBroker.Util.SocketConnectionInfoEx connectInfo, int progressServerType, System.Collections.Specialized.NameValueCollection connectionOptions, object userId, string password) Progress.o4glrt.dll!Progress.UBroker.Client.BrokerSystem.processConnect(string requestID, object connectionInfo, string username, string password, string clientInfo, bool fToBroker, int clntAskCaps, out int connAckFlags) Progress.o4glrt.dll!Progress.UBroker.Client.BrokerSystem.connect(string requestID, string url, string username, string password, string clientInfo, out int connAckFlags) Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.Session.connect(string requestID, string url, string userId, string password, string clientInfo, int proxyGenVersion) Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.BrokerSessionList.reserveSession(bool fCreateNewSession) Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.reserveSession(bool fCreateNewSession, Progress.Open4GL.DynamicAPI.SessionPool.PickList pickList, bool fRefresh) Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.createSession() Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.initializePool() Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.SessionPool(string appName, Progress.Open4GL.DynamicAPI.IPoolProps properties, Progress.Common.EhnLog.IAppLogger log, string poolName, string requestID) Progress.o4glrt.dll!Progress.Open4GL.DynamicAPI.SessionPool.createPool(string appName, Progress.Open4GL.DynamicAPI.IPoolProps properties, Progress.Common.EhnLog.IAppLogger log, string requestID) Progress.o4glrt.dll!Progress.Open4GL.Proxy.ProObject.initAppObject(string appName, Progress.Open4GL.DynamicAPI.IPoolProps properties, Progress.Common.EhnLog.IAppLogger log, string requestID) Progress.o4glrt.dll!Progress.Open4GL.Proxy.AppObject.initAppObject(string appName, Progress.Open4GL.DynamicAPI.IPoolProps properties, Progress.Common.EhnLog.IAppLogger log, string requestID, int proxyGenVersion) LumberTrackProxy.dll!UFP.LumberTrack.AppServer.Proxy.LumberTrackProxy.LumberTrackProxy(Progress.Open4GL.Proxy.Connection connectObj, bool useWebConfigFile)
The exception appears to be a concurrency problem, and I don't have trouble with simple, single-threaded apps that use the openclient proxies. Has anyone else run into these issues? In earlier versions of the openclient assembly, these types of problems were more common (even against classic appserver.) But now that I'm connecting to PASOE and using a recent version of the openclient assembly, I hoped that Progress would fix more of the underlying problems. Our Progress.o4glrt.dll is up to version 184.108.40.2065.
It is pretty clear that parts of the .Net openclient wasn't designed to be used from multi-threaded apps and services. It would be nice if there was some explicit documentation from Progress that tells us what parts of the openclients are safe (and well-tested) to be used on separate threads..
In my code I'm not sharing any references to Proxy object between threads. All my session-managed connectivity uses independent connections (appobject, procobjects, etc).
When I open the Progress.o4glrt.dll assembly with Telerik JustDecompile, you can see that classes such as this one (Progress.UBroker.Util.HTTPConnection) make heavy use of static members and they don't bother to do any concurrency synchronization at all.
Eg. below are a bunch of static members of HTTPConnection. They are sophisticated collection classes ("Vectors" and Hashtables). But the manipulation of these collections involves no concurrency control at all. When looking at this code, I'm wondering if it was copy/pasted from the Java openclient implementation by someone who didn't really understand .Net. Does the Java openclient have concurrency issues? Maybe the programmers of both openclients weren't familiar with building an API that supports parallel execution and high concurrency :
private static Hashtable non_proxy_host_list; private static Vector non_proxy_dom_list; private static Vector non_proxy_addr_list; private static Vector non_proxy_mask_list;
I've heard that "session-free" scenarios are better tested and may work better from multiple threads (as compared to "session-managed"). But I don't think there is formal documentation to that effect. Perhaps the .net openclient will be rewritten for OE 12 and this will be a moot point. But that may take a while. If anyone else has run into these problems with the .Net openclient (connecting against PASOE in 11.7), I would appreciate your suggestions.