Skip to Content

wdDoExit issue

Hi developers,

In my WDP component, I need to lock some backend object at startup.

In the wdDoExit method of the only view or of the component controller I would place some unlock code.

Lock/Unlock is performed through a component interface method which in turn calls a RFC.

If I place the unlock call in the view controller it is executed upon component kill, but not when users close the browser window (I know this since the abap debugger won't be triggered). How can I force the execution also upon browser kill?

Alternatively, I placed the unlock call in the component controller wdDoExit, but I get:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Creating new Controllers while/after exiting a Component is not allowed. 

How I can achieve this?

Thanks

Vincenzo

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 05:24 PM

    Hello,

    so far i know, it is not possbile to detect if the user has closed the IE Window inside the WD framework.

    But if u are using RFC calls you should not get any problems, you can close the call directly after getting all needed information.

    On the model Object of your ModelNode is an method called disconnectIfAlive() you can use this method to close the connection.

    Otherwise when you have manually created an java Object of the RFC model type there is also an disconnectIfAlive method which you can call.

    So but you do not need this after all. Every RFC call or every JCO connection which are used for RFC calls have timeouts and they close after this timeout by herself. Thats the theory 😊

    Any old instances of your code should also be automaticly deleted if the garbage collector appears.

    kind regards

    Fabian

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 10, 2008 at 05:30 PM

    Actually you can unlock your objects in WDP event handlers for typical UI events such as exit, back and so on.

    If users do something odd such as replacing the address in the url bar or shutting down the browser, the RFC session is going automatically down and so do locks.

    thanks, kind regards, Vincenzo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2008 at 06:40 AM
    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.