Skip to Content
author's profile photo Former Member
Former Member

Closing resources in a JCO.Server


I developed a server application using Java Connector that listens to calls from a SAP system. What I did was extend class JCO.Server and implement method handleRequest.

My problem is that I need to close some resources when the server goes down (caused by an error) or when I shut down the server. I have tried to override the run method like this (see below) but it doesn't seems to work because the method never returns... does anyone have an ideia?



public class MyServer extends JCO.Server {

public MyServer(String gwhost,

String gwserv,

String program_id,

IRepository repos) {

//init code here


protected void handleRequest(JCO.Function function) {

//do stuff


public synchronized void run () {;

//close resources after this



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Feb 23, 2004 at 10:08 AM

    Hello Vasco,

    sorry that I have to tell you that what you developing is already there. On the other hand this means that you don't have toi finish this. the R/3 service does exctly what you want.

    To do the things you want to do, you had to develop exactly a service for the Java Engine. Well, that is much more work.



    Add comment
    10|10000 characters needed characters exceeded