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 difference between groups and ACL groups

1 Answers   TCS,


In JMS can we publish a document to multiple brokers ? If Possible ,how can we achieve that ?

1 Answers  


what is the difference between Schema and SchemaDT

2 Answers  


How to Create an ACL?

4 Answers   TCS,


How to Restore a Session on a Server?

1 Answers  






What Is a Regular Expression?

1 Answers   FRB,


can we invoke morethan one service in trigger?

4 Answers   Accenture,


How to use SEQUENCE as the Target of a BRANCH?

2 Answers   Accenture,


When to Unlock an Element?

3 Answers  


Explain header handlers in web services

0 Answers   CTS, Satyam,


in filepooling process the document is not updated in target location means its in error directory how to achieve this problem?

0 Answers   Quinnox,


When we use repeate, exit flow steps?

0 Answers  


Categories