use of finally block in exception handling in webmethods



use of finally block in exception handling in webmethods..

Answer / 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

More WebMethods Interview Questions

what is the variable need to keep in the clearpipeline service

1 Answers   Wipro,


How ACLs Affect locking?

2 Answers  


When we use repeate flow steps?

0 Answers  


what is the difference between a loop and a repeat?

5 Answers   FCS, TCS,


What Does an IS Schema Look Like?

1 Answers  






What Happens When a Breakpoint is Encountered?

1 Answers  


What Is an ACL?

1 Answers  


What Does a Flow Service Look Like in Diagram View?

1 Answers   Colt, IBM,


what are the functions or operations support 'WSDL"

1 Answers   CSC,


how to configure sap adapter6.1

0 Answers   IBM,


different b/t war,ear,jar files?

1 Answers   TCS,


what is adictionary

3 Answers  


Categories