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 Dimensionality?

2 Answers  


explain about endpoint url,endpoint alias?

1 Answers   TCS,


When and why should we use transformers and flow services? How are they different from each other?

9 Answers   Cap Gemini,


what are extended settings?

2 Answers   IBM,


different b/t war,ear,jar files?

1 Answers   TCS,






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

0 Answers  


what is the variable need to keep in the clearpipeline service

1 Answers   Wipro,


What Is a Regular Expression?

1 Answers   FRB,


Difference between Scheduler service and adapter pooling notification?

1 Answers   CSC,


What is the difference between a system locked element and a read-only element?

3 Answers  


What Is Flow Diagram View?

1 Answers  


We have created a insert notification ,is there any way to process the document in the subscriber without publishing it .....?

2 Answers  


Categories