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 main difference between webservies 6.5 and webservies 7.1.2

1 Answers   IBM,


What is the file (.jar) name that sharing between WebMethods integrated with JD Edwards???

1 Answers  


How many ways can you invoke a service?

1 Answers  


what is meant by "Block time out" and "Expire time out " in jdbc adapter configuration

1 Answers   Colt, Satyam,


In what folder is the webMethods documentation for Broker located?

2 Answers  






what is difference between invoke & transformers 

5 Answers  


territories in webmethods

5 Answers   TCS,


Explain what is indices in map flow step?

0 Answers  


What Is a Flow Service?

1 Answers  


I have a loop a, under which I have a child loop b, under which I have a branch with few services with a condition. If a condition is satisfied , then I needmy branch to exit from loop b, what should I do?

1 Answers  


When we use repeate flow steps?

0 Answers  


what is difference between groups and ACL groups

1 Answers   TCS,


Categories