use of finally block in exception handling in webmethods

Answer Posted / wmlead

Lets assume we have a code where we are using open ssh and in the try block we are doing a sftp login .

So in case of success or error either step we would have to do a logout . So to avoid code duplication both in end of try and catch block we can have a finally block (exit on done). Do a logout in this sequence.

Also it can hold good when we do a manual connection to a DB and irrespective of success or failure we want to close connection.

Main(Exit on success)
|
|----Try(Exit on Failure)
|
|----Catch(Exit on Done)
Finally(Exit on Done)

Is This Answer Correct ?    16 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where do you implemented pub-sub architecture?

822


When we use repeate flow steps?

796


how to configure sap adapter6.1

2178


Explain what are the new features in 8.0 compared to 7.1?

759


When we use repeate, exit flow steps?

791


What are the advantages of eai?

849


how to configure sap adapter 4.1

5534


How to convert document list to document? If document list contain documents and documents contain strings field. How to convert?

804


can we build loop step with in the branch in such a way that the interface is look like that branch sequence: Deposit loop xxxxxx sequence: current loop xxxxxxx sequence: savings loop can we achieve the above senario.

2172


How many minutes have you spent in your lifetime reading documentation or actually (gasp) working with any webMethods product on a real project?

2208


can any one please post Q and Ans for Trading Networks in webMethods

2217


Explain about pub-sub architecture, where do you implemented this?

773


can anyone explain in brief about TN Consloe and Webmethods...? As well as All flow steps in webmethods: Branch Repeat Loop Sequence (explain also Try -Catch block for error Handling)

1651


How many interfaces you implemented sofar?

904


When Should You Use Flow Diagram View?

2343