Friday 22 June 2012

webmethods developer interview questions and answers

WebMethods Faqs-->4

46.What is the difference between drop and delete pipeline variable?

Drop pipeline is an explicit cleanup. It is a request for the pipeline to remove a variable from the available list of variables and make the object it refers to available for garbage collection by the Java Virtual Machine.
Delete
 is purely a design time operation to remove the variable from the current view. It is only of use if you have created a variable that you didn't mean to create. If you delete a variable that was there because it was previously in the pipeline when you change the view in developer you will see the variable appear again.

47.How do I see the java code for my flow service ?

Flow is not turned into java code. It resides on disk as XML representing the flow operations which is then parsed and turned into an in-memory java tree of the operations. Although the underlying code that implements the flow operations is java, it is stored on disk as XML.

48.How do I throw an exception when using a try-catch block ?

Set a flag in your catch block or leave a variable holding the error message in the pipeline.
Outside the catch block put a branch on that variable or flag and if it is non-null then exit with failure or call the service that generates the exception.

49.How to get the current index of the List in a loop?

There is a special variable on the pipeline called $iteration which will be incremented as the loop operator works up through the list.

49.How to limit a flow service executed only by one thread at a time?
  • Create a java service
  • Create a private static object on the shared source (private static Object LOCK_OBJ = new Object(); )
  • Have the code below on the java service source:
IDataCursor idc = pipeline.getCursor();
IDataCursor idcResult = null;

try {
// put this section into a critical section to ensure single-threaded execution

synchronized(LOCK_OBJ)
                {
                    Execute a flow service using Service.doInvoke
                }
idc.destroy();
idcResult.destroy();

} catch (Exception exc){
                ServerAPI.logError(exc);
                idc.destroy();    
throw new ServiceException(exc.toString());             }\\

50.How do I sort using the JDBC select adapter service?

Although there is no tab to specify "order by" the same functionality is able to be specified in the "SELECT" tab. One of the columns in the is labelled "Sort Order" which will allow you to specify the column(s) you wish to sort by. To alter the order: simply alter the order of the columns selected.

51.How should I organise connection pools ?

If you have adapter notifications and adapter services then you will need to have two separate connections. Otherwise you may get strange errors about transactions and the like. You should also avoid having connection pools shared across different functional areas, even if they are pointing to the same database. The reason for this is that tuning the size of the pool becomes quite difficult if you have multiple types of usage of a pool. You are also unable to easily change the database settings for one without impacting on the other. One approach that seems to work quite well is to have separate pools for each package (generally.. not a hard and fast rule though), as your packages should generally be divided up according to functional area too.

52.How to preserve existing pipeline before a restorePipeline step ?

Set the "$merge" variable in restorePipeline or "merge" in restorePipelineFromFile to be true. This will ensure that everything in the pipeline before a restorePipeline step is preserved.

53.What is the primary function of the built-in pub.flow:savePipeline service?

Save the current pipeline to a named memory location on the Integration Server.

54.What is the default behavior if a Flow EXIT does not specify a "from"?

$loop will be assumed, and a com.wm.lang.flow.FlowException will be thrown if the EXIT is not in a LOOP

55.An Integration Server package may have one or more startup services. When does a startup service execute?

Startup service will execute whenever the package is loaded or re-loaded

56.What is the primary purpose of a Web Service Connector?

The purpose of Web Service Connector is to invoke a Web Service on a different web server Startup service will execute whenever the package is loaded or re-loaded

57.The Developer was used to create a Java Service named myService in a folder named myFolder in the Default package. What is the best way to hide the source code of the Java service?

Configure an Access Control List which only allows members of authorized groups and assign it as the Read ACL for the service

58.When using the SEQUENCE Flow operation, if exit-on is set to SUCCESS, what condition will cause the entire SEQUENCE to fail?

When all of the child operations fail .

59.The Integration Server requires access to the Java classes for each JDBC driver that it will use. Typically, where must such Java classes be placed?

Java classes are be placed in webMethods6\IntegrationServer\lib\jars

60.TThe Package Management interface of the webMethods IS Administrator can be used to create package dependencies. Package dependencies can be used to:?

Ensure that specific webMethods IS packages are loaded before the depending package loads

0 comments:

Post a Comment