Saturday, December 12, 2015

Oracle SOA Interview Questions and Answers (File Adapter)

Question: What is “Minimum Age” in File adapter?

Answer: This parameter specifies the minimum age of files to be retrieved. This enables a large file to be completely copied into the input directory before it is retrieved for processing.


Question: What is trigger file in File adapter?

Answer: When we choose “Trigger File” checkbox, file adapter will not poll/read the file/files from specified directory unless it sees trigger file in trigger file directory. Once trigger files is there in the trigger file directory, file adapter will start polling the files.


Question: What is Logical path in File adapter?

Answer: This parameter specifies the logical input directory to be polled. The parameter is of type String. We provide value of logical path in composite.xml file.


Question: How to handle errors when we unable to read/poll a file using file adapter if that file is corrupt?

Answer: We need to use File rejection handler to catch these types of error.


Question: What is Sync-Read in file adapter?

Answer: When we want to read a file in between our BPEL flow then we use this option.


Question: Can we read remote files using file adapter?

Answer: To read file from remote location we need to use FTP adapter.


Question: What is native format?

Answer: when we want to read the file as it, means we don’t want to transform file content to XML format then we use native format option.




Question: What is difference between Transient and Durable processes?

Answer: Below is difference between Transient and Durable process
Transient Process: Transient processes do not incur dehydration during their process execution. If an executing process experiences an unhandled fault or the server crashes, instances of a transient process do not leave a trace in the system.
Durable Process: Durable processes incur one or more dehydration points in the database during execution. Dehydration is triggered by one of the following activities:

  • Receive activity
  • OnMessage branch in a pick activity
  • OnAlarm branch in a pick activity
  • Wait activity Reply activity
  • checkPoint() within a activity


Question: Can we set audit level at BPEL level?

Answer: Yes, we can use bpel.config.auditLevel property inside composite.xml file for BPEL process service component to set audit level for BPEL. This property takes precedence over audit level settings at the SOA Infrastructure, service engine, and SOA composite application levels.

<component name="BPELProcess">
   <implementation.bpel src="BPELProcess.bpel" />
   <property name="bpel.config.auditLevel"></property>
</component>


Question: What are disadvantages of Asynchronous process?

Answer: It adds dehydration overhead. This can become a problem if there are large numbers of asynchronous processes waiting for a response since for every callback, a new thread/transaction is needed and a callback needs to be matched to a correlation table which takes longer if there are a lot of open processes. Design processes to be synchronous as much as possible, avoid nesting of asynchronous processes also avoid synchronous processes calling asynchronous processes.


Question: Does Oracle recommend batch processing?

Answer: No, we should avoid batch processing in BPEL as much as we can. Batch processing takes lot of memory and causes a lot overhead for storing audit information. We should put the work to be done in a separate BPEL process and optimize this process. Design for worst case scenarios. Implement retry mechanisms in fault-policies. Implement your own scheduling mechanism to spread the load, if no message level processing is needed, ODI might be an option.


Question: What is idempotent activity?

Answer: An idempotent activity is an activity that can be retried.
This property has the following values:

False: Activity is dehydrated immediately after execution and recorded in the dehydration store. When idempotent is set to False, it provides better failover protection, but may impact performance if the BPEL process accesses the dehydration store frequently.

True (default): If Oracle BPEL Server fails; it performs the activity again after restarting. This is because the server does not dehydrate immediately after the invoke and no record exists that the activity executed. Some examples of where this property can be set to True are: read-only services (for example, CreditRatingService) or local EJB/WSIF invocations that share the instance's transaction.


Question: What is nonBlockingInvoke property?

Answer: This property is used when we use Flow or Flow N in BPEL. By default, Oracle BPEL Process Manager executes in a single thread by executing the branches sequentially instead of in parallel. When this property is set to True, the process manager creates a new thread to perform each branch's invoke activity in parallel. This property is applicable to both durable and transient processes.


Question: What is streamResultToTempFile property in Mediator?

Answer: Until 11g Release 1 11.1.1.3, for XSLT operations in Oracle Mediator, the result was cached into memory as a whole document in binary XML format. For large document processing, this caused out-of-memory errors. Starting with 11g Release 1 11.1.1.4, the streamResultToTempFile property is available. This property enables XSLT results to be streamed to a temporary file and then loaded from the temporary file. Set streamResultToTempFile to yes when processing large payload using XSLT. The default value is no.

<component name="Mediator1">
   <implementation.mediator src="Mediator1.mplan"/>
   <property name="streamResultToTempFile">yes</property>
</component>

This property is recommended only for processing large payloads. Enabling this property could reduce performance for normal payloads.



Question: Which property we have to use to process JMS, AQ or MQ messages on one node in cluster environment.

Answer: we use singleton property in composite.xml file.

<property name="singleton" type="xs:boolean" many="false" override="may">true</property>


Question: Which property we need to use to control number of message processed from MQ at one time?

Answer: we need to use InboundThreadCount property to control number of messages which MQ adapter pick from MQ.


Question: Which property we need to use with singleton property to process the message in sequential order for AQ?

Answer: We need to set activtionInstances=1 along with singleton property for AQ adapter in cluster environment to process message in sequential order.


Question: Can we set IncludeFiles property dynamically for file/ftp adapter?

Answer: No, by default we can’t set IncludeFiles property at run time. But Oracle provided one patch (patchId=10380349), if we apply that then we can use set this property at run time.


Question: What is delay property for AQ adapter?

Answer: This property is used when we don’t want to make the message visible to outside world for some time. Message is visible and ready to read once that delay time expire message. This property is set at Invoke for AQ adapter.


Question: What is adapter.jms.receive.threads property for JMS adapter?

Answer: To improve performance, the adapter.jms.receive.threads property can be tuned for an adapter service. The default value is 1, but multiple inbound threads can be used to improve performance. When specified, the value of adapter.jms.receive.threads is used to spawn multiple inbound poller threads.


Question: What is UseStaging property in file and FTP adapter?

Answer: If the parameter is set to true, then the outbound Oracle File or FTP Adapter writes translated data to a staging file and later streams the staging file to the target file. If the parameter is set to false, then the outbound Oracle File or FTP Adapter does not use an intermediate staging file. It is defined in Outbound JCA File.


Oracle SOA Interview Questions and Answers (Adapter)

Question: Types of Adapters ?

Answer: Transactional & Non- Transactional Adapter

Transactional : Database, JMS, AQ, MQ adapters

Non- Transactional: File & FTP adapter


Question: Difference between Read & Sync-Read operation in File & FTP adapter?

Answer: Read is used when Polling is required to be done while SyncRead is used when you need to read the file in between the flow i.e you want to have a synchrnous communication.


Question: What is File Debatching ?

Answer: When a file contains multiple messages, you can choose to publish messages in a specific number of batches. This is referred to as debatching. During debatching, the file reader, on restart, proceeds from where it left off in the previous run, thereby avoiding duplicate messages. File debatching is supported for files in XML and native formats.


Question: What is File ChunkedRead ?

Answer: This is a feature of Oracle File and FTP Adapters that uses an invoke activity within a while loop to process the target file. This feature enables you to process arbitrarily large files.

If an invalid payload is provided, then ChunkedRead scenarios do not throw an exception. When a translation exception (bad record violating the NXSD specification) is encountered, the return header is populated with the translation exception message that includes details such as line and column where the error occurred. All translation errors do not result in a fault. These errors are manifested as a value in the return header. You must check the jca.file.IsMessageRejected and jca.file.RejectionReason header values to ascertain whether an exception has occurred. Additionally, you can also check the jca.file.NoDataFound header value.


Question: Multiple Directories supported in File & FTP adapter ?

Answer: The Oracle File and FTP Adapters support polling multiple directories within a single activation. You can specify multiple directories in JDeveloper as opposed to a single directory. This is applicable to both physical and logical directories.


Question: What is the use of Trigger file ?

Answer: By default, polling by inbound Oracle File and FTP Adapters start as soon as the endpoint is activated. However, if you want more control over polling, then you can use a file-based trigger. Once the Oracle File or FTP Adapter finds the specified trigger file in a local or remote directory, it starts polling for the files in the inbound directory.

For example, a BPEL process is writing files to a directory and a second BPEL process is polling the same directory for files. If you want the second process to start polling the directory only after the first process has written all the files, then you can use a trigger file. You can configure the first process to create a trigger file at the end. The second process starts polling the inbound directory once it finds the trigger file.


Question: Types of Rejection Message Handler ?

Answer

  • Web Service Handler
  • Custom Java Handler
  • JMS Queue
  • File



Question: What is MDS & Why we use MDS in Oracle SOA?

Answer: MDS stands for Oracle MetaData Service. It is central repository inside Oracle Fusion Middleware. MDS purpose is to provide centralized store where we can keep, manage & access metadata.

Metadata is often defined as data about data, or in other words, pieces of information that describes and gives meaning to other information. Typical examples of metadata used by Oracle Fusion Middleware components are XML files, XSD schema files, XSL transformations, SCA composites, BPEL processes, WSDLs, business rules, Oracle ADF pages, JaveServer Pages (JSP), and Oracle ADF task flows, among others.

The same metadata that is used during the design phase of application is used at application runtime through the metadata service layer. This ensures consistency through the lifecycle of the application. Metadata such as XML files or XSD schema files is usually shared among different components. Therefore, it is not only necessary that those resources can be accessed easily and referenced by all the components, but it is also important that they remain consistent; a change in the metadata should be reflected in all the components that are referencing it. Having only one copy of each metadata resource avoids unnecessary redundancy and guarantees that the changes are made in only one place.


Question: Types of MDS Repository?

Answer: File-Based & DB Based.


Question: What is File-Based MDS Repository?

Answer: The idea behind file-based repositories is to allow developers to have a light repository available in their local environment that can be easily adapted for development and tests; a file-based repository relieves developers of having to configure and maintain an external database while providing necessary functionality, such as file referencing and customizations. These kinds of repositories are easily modified and maintained, since they define a directory structure similar to any other directory structure inside an operating system. They can be navigated and altered using common shell commands or any kind of visual file explorer application. The file-based repository is usually located inside the Oracle JDeveloper home (JDEV_HOME/integration) if the default configuration is used.


Question: What is DB-Based MDS Repository?

Answer: Database-based repositories are used in production environments where robustness is needed. These repositories are created using the Repository Creation Utility (RCU) application from Oracle. This utility helps with the creation of a new database schema with its corresponding tables and objects. Repositories can later be registered or deregistered via the Oracle Enterprise Manager Fusion Middleware Control console.


Question: Which configuration file store MDS configurations?

Answer: The adf-config.xml file is a configuration file that is used to store MDS Configurations.


Question: What type of WSDL file we usually keep in MDS?

Answer: We usually keep Abstract WSDL’s only in MDS.


Question: By how many ways we can handle error/fault in BPEL?

Answer: By using Catch blocks & Fault handling framework.


Question: Can we use both Catch block & fault handling framework in one BPEL?

Answer: Yes, we can have both Catch Block & Fault policies files in one BPEL.


Question: Standard Faults in BPEL?

Answer: Below is the list of Standard Faults in BPEL.

  • bindingFault, conflictingReceive, conflictingRequest, correlationViolation
  • forcedTermination, invalidReply, joinFailure, mismatchedAssignmentFailure
  • remoteFault, repeatedCompensation, selectionFailure, uninitializedVariable


Question: Standard Faults in Mediator?

Answer: Mediator has only one standard fault.

{http://schemas.oracle.com/mediator/faults}mediatorFault.


Question: How to get Fault Trace in CatchAll block?

Answer: By using getFaultAsString() function.


Question: Can we have custom faults in BPEL?

Answer: Yes we can create custom faults in BPEL, these faults are usually called Business Faults and we usually handle it by using specific Catch block.


Question: Can we re throw a fault from Catch blocks?

Answer: Yes, we can re-throw fault from Catch block.


Question: Where we keep fault-policies.xml & fault-binding.xml files?

Answer: We can keep these files either local to project or in MDS and in both the cases we have to specify the path in composite.xml file.



Question: What is OWSM?

Answer: OWSM stands for Oracle Web Service Manager. Oracle Web Services Manager offers a comprehensive and easy-to-use solution for policy management and security of service infrastructure. It is a standalone platform for securing and managing access to web services.


Question: How do we call secured web service from SOA?

Answer: By using OWSM policies.


Question: Can we generate custom OWSM policies?

Answer: Yes, we can create custom OWSM policies.


Question: By how many ways we can add OWSM policy to Web Service?

Answer:

  • Through policy annotations at design time
  • Via the Administration Console at runtime
  • Via Fusion Middleware Control or WLST


Question: When we call secured web service from SOA, which policy we will use “Client” or “Service”?

Answer: When we call secured web service from SOA then we add “Client” policy to reference partner link and when we want to secure our web service then we use “Service” policy.


Question: Can we use OWSM with Oracle Service Bus?

Answer: Yes, we can access OWSM policies from OSB.


Question: Can we attach OWSM policy to multiple composites to secure composites?

Answer: yes, we can apply one policy to all composites in one domain using policy sets.


Question: what is the scope of Policy Sets or where we can apply Policy sets ?

Answer:

  • Domain — all policy subjects of the specified type in a domain
  • Application or Partition—all policy subjects of the specified type in an application or SOA partition
  • Application module or SOA composite—all policy subjects of the specified type in an application module or SOA composite
  • Service or reference—all policy subjects of the specified type in a SOA service or reference
  • Port or component—all policy subjects of the specified type in a port or SOA component