For our system, we run a non-GUI ServerApplication in each AppServer Node using a ServerApplication# ini file setting. This application does the app.enableThinClientConnBalancing() call, if appropriate to do so, and then immediately terminates. This ensures each of the AppServers we're running are setup for connection balancing without permanently using up any additional process licences. Then, each of our thin clients that connects also does the app.enableThinClientConnBalancing() call, again only if appropriate to do so.
Our initialization logic for this non-GUI app looks like the following:
Code: Select all
constants
NoAppServerGroup : String = "<None>" ;
vars
appServerGroupName : String ;
begin
if not node.isApplicationServer then
// Prevent 15901 exception when running as fat client or in single user mode
return ;
endif;
// Let's get the AppServerGroupName, if they've specified one
appServerGroupName := app.getProfileStringAppServer( app.getIniFileNameAppServer, IniSection_JadeAppServer, IniSetting_AppServerGroupName, NoAppServerGroup );
if appServerGroupName <> NoAppServerGroup then
// They have specified an AppServerGroupName, so we're safe to enable thin client connection balancing without getting a 15902 exception
app.enableThinClientConnBalancing;
endif;
epilog
terminate ;
end;
Note: One potential downside to this approach is that there may be a slight delay if the thin client that is given first opportunity to handle the balancing of a new connection is too busy to service the request when a new thin client connects.
Cheers,
BeeJay.