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 a comment
10|10000 characters needed characters exceeded

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.