Webspeed and static classes

Posted by JamesDev on 24-Oct-2012 17:41

I have a simple class serving as an enum. It has a number of static properties for each of the enum values and two static methods: one for parsing a string into an enum value and another to return all the enum values in the class. I find that if I add an additional enum value static property and update the methods to handle the new property and recompile, that, depending on which agent I hit, my updated class may not be used. Some of the agents may continue to use the older version. I suppose I was under the impression that each request created a new session and then terminated the session when it was finished, but that doesn't appear to be the case.

Other than rewriting the class to remove the static methods and properties, is there any way around this using code? Perhaps some way to force unload/refresh the static class?

I'm on Progress 10.2B, by the way.

Thanks.

All Replies

Posted by Matt Baker on 24-Oct-2012 18:50

Static data is not released from memory. And agents are reused until they are trimmed.

Trim all the agents.  It is not done automatically after each request.  If you're using PDS for OE 11 (10.2B didn't have webspeed support), there is an option in the preferences to trim all agents before publishing any code (it is on by default).  Otherwise get the habit of running

wtbman -name wsbroker1 -trim 100

This thread is closed