Unable to find connect method under o4glrt.jar openedge

sekarv

New Member
Hi,

We have a java application which connects to the progress appserver using the various methods available under o4glrt.jar. We are now in the process of upgrading from 9.1e to openedge. The appobject.class file under the o4glrt.jar (openedge) file does not contain the "connect" method while the 9.1e appobject class had this method already available.

Could you please let me know as to where to pick these methods from after the openedge upgrade. Or should we be using a different jar file ?

Thanks
Sekar
 

RealHeavyDude

Well-Known Member
Never worked with the Java Open Client in V9 - didn't really know that it was available back then as I am pretty sure the open client technology ( including Java, .NET and WebServices ) was introduced with OpenEdge 10. IIRC there was some toolkit available though ...

Here is a code sample to connect to a state-fee AppServer ( which I use in a java servlet used in Google Web Toolkit application ):
package com.jra.app.gug.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.jra.app.gug.client.ASConnection;
import com.jra.app.gug.client.User;
import com.progress.open4gl.*;
import com.progress.open4gl.javaproxy.*;
import com.jra.app.gug.server.*;

SuppressWarnings("serial")
public class AppServerConnection extends RemoteServiceServlet implements ASConnection
{
// AppServer connection parameters
private final String APP_SERVER_URL = "AppServer://uat-addonsec.appl.jra.ch:5162/aos_icfrepos_java";
private final String AS_USER_NAME = "";
private final String AS_PASSORD = "";
private final String APP_SERVER_INFO = "";
private Connection appServerConnection = new Connection ( APP_SERVER_URL, AS_USER_NAME, AS_PASSORD, APP_SERVER_INFO );
private user appServer = null;

public AppServerConnection ( ) throws IOException
{
try
{
// Connect the AppServer
appServerConnection.setSessionModel ( 1 ); // State-free AppServer
appServer = new user ( appServerConnection );
System.out.println ( "(I) Connection to AppServer successfully established." );
}
catch ( com.progress.open4gl.Open4GLException ex )
{
// If there is an application defined return string, then display it
if ( ( String ) ( ex.getProcReturnString ( ) ) != null )
{
System.out.println ( ( String ) ( ex.getProcReturnString ( ) ) );
}
else
{
// Display Progress defined error message
System.out.println ( ex.toString ( ) );
// Or display new generic message
System.out.println ( "(E) Connection to AppServer failed." );
}
}

} // Constructor


public void destroy ( )
{
if ( appServer != null )
{
try {
appServer._release ( );
} catch (SystemErrorException e) {
System.out.println ( e.toString ( ) );
e.printStackTrace();
} catch (Open4GLException e) {
System.out.println ( e.toString ( ) );
e.printStackTrace();
}
}
if ( appServerConnection != null )
{
try {
appServerConnection.releaseConnection ( );
} catch (Open4GLException e) {
System.out.println ( e.toString ( ) );
e.printStackTrace();
}
}
}

}
Note that the user type in this example is generated by the Proxygen tool.

You should read the Java Open Client book which comes as part of the PDF documentation. It contains all the explanations you need - for my part I found it very helpful.

Heavy Regards, RealHeavyDude.
 
Top