OpenEdge 12.3 and above offers the isConnected() method for instantiated Progress.Open4GL.Proxy.OpenAppObject instances, which is a boolean value that indicates whether there is a valid session on the PAS for OpenEdge server for the requesting client.

The isConnected() method:
  • Returns true if there is a valid session on the server for the client.
  • Resets the session inactivity timer, so that you can ensure a request sent after the isConnected() method is called does not fail due to inactivity.

isConnected() method code sample for Java

The following Java code sample makes a connection to a PAS for OpenEdge instance's APSV transport:

Connection connection = new Connection ("http://localhost:8810/apsv", "", "", "");

connection.setSessionModel( Connection.SM_SESSION_MANAGED );

OpenAppObject appobj = new OpenAppObject (connection, ""); 

if (appobj.isConnected())  { 

     System.out.println("connected: true");
     // The session on the PAS for OpenEdge server is valid. 
	// write code to run a procedure with this OpenAppObject.
 
} else {

     System.out.println("connected: false"); 

}