When you set the WODirectConnectEnabled flag to YES in WebObjects 5.2 or later (all platforms), application instances that are scheduled to restart periodically in JavaMonitor won't restart. You also won't be able to activate RefuseNewSessions in JavaMonitor, and WOApplication.refuseNewSessions() will not set the refusing state.
This happens because starting with WebObjects Release 5.2, the "refuseNewSessions" feature will not work in a deployed WebObjects application when WODirectConnectEnabled is enabled.
To resolve this issue, make sure that you set WODirectConnectEnabled to NO to disable it when deploying WebObjects applications. This is strongly recommended.
If you can't disable direct connect mode, modify the method "WOApplication.refuseNewSessions()" as follows:
// add a private variable to keep track of refusing state // and initialize to false private boolean myIsRefusingNewSessions = false;public synchronized void refuseNewSessions(boolean aVal) { myIsRefusingNewSessions = aVal; // App will terminate immediately if the right conditions // are met. if (myIsRefusingNewSessions && (activeSessionsCount() <= minimumActiveSessionsCount())) { NSLog.debug.appendln("<"+this.name()+">: refusing new clients and below min active session threshold"); NSLog.debug.appendln("<"+this.name()+">: about to terminate..."); terminate(); } }
public boolean isRefusingNewSessions() { // To be on the safe side also keep the 'original' information here return ((super.isRefusingNewSessions()) || myIsRefusingNewSesions); }
Note: Disabling the direct connect mode can have the following effects on a deployed WebObjects application.