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

Close jco connection

Hi

Can anyone tell me how to retrieve the existing jco connection and close it. Can we write that code in wdExit.

Thanks

Vidyadhar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 05:22 AM

    Hi,

    Following code can be used

    AAAAModel thisModel =

    (AAAAModel) WDModelFactory.getModelInstance(

    AAAAModel.class);

    thisModel.disconnectIfAlive();

    You can call this code's method in wdDoExit()

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 06:39 AM

    Hi vidyadhar,

    try this code

    wdContext.currentBAPIElement().modelObject().modelInstance().disconnectIfAlive();

    and u dont want to write that code in WDEXIT.

    with regards,

    sriram

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 06:46 AM

    Hi

    Thanks for your reply. My problem is that on every refresh of the page I want to close the old connection explicitly and I will create a new connection. So what should I write in init to close the old connection?

    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.