Consultor Eletrônico



Kbase P20184: How to get sample program in $DLC/src/samples/open4gl/applet
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/25/2003
Status: Unverified

GOAL:

How to get sample program in $DLC/src/samples/open4gl/applet to release connections to the appserver

FACT(s) (Environment):

Progress 9.1D

FIX:

The _release() method should be called on each AppObject, SubAppObject
or ProcObject object that has been created in the application. This will
cause the applet to disconnect from the AppServer.

In the sample applet code, the destroy() method in Open4GLDSO.java
should look like this in order to release the AppServer connection:

public void destroy()
{
m_rs._release();
m_rs = null;
m_aoClassObject._release();
m_aoClassObject = null;
m_appObject._release();
m_appObject = null;
}

Also note the connections do terminate properly, even without making the above modifications, because when the references are set to null the Java garbage collector collects the objects. This in turn calls their finalize methods and this will do the _release automatically.