Top 50 AJAX Interview Questions and Answers

The blog provides the Top 50 AJAX Interview questions and answers for experienced professionals. AJAX stands for Asynchronous JavaScript and XML used for developing fast and rich web applications. 

Many companies prefers developing UI using AJAX Technology and AJAX Interview questions and answers given below helps professionals to revise their AJAX knowledge.  

The below given includes basic and advanced AJAX questions and answers which could be helpful for the professionals for preparing UI /UX Job Interviews. 

AJAX Interview Questions and Answers

AJAX stands for Asynchronous JavaScript and XML used for developing fast and rich web applications using XMLHttpRequest object for communicating with the server without reloading the page.

The below given are the advantages of AJAX

  1. AJAX helps in developing fast and interactive web pages
  2. AJAX does not depend on server technology
  3. AJAX based requests uses less server bandwidth
  4. AJAX makes form validation simple

The below given are the disadvantages of AJAX

  1. AJAX is not supported by all browsers
  2. AJAX code is easy to read
  3. Malicious code can be inserted using custom script

AJAX can send and receive the data in JSON,XML and text file formats

The main features of AJAX are:

  1. Send the request to the server without reloading the page
  2. Receives and update the data received as server response

  1. Facebook
  2. Twitter
  3. Gmail

XMLHttpRequest objects are used to communicate with the server where the request is sent to the server in the background without reloading the page. It enables to make the partial page update without interrupting the user and is heavily used in AJAX programming.

XMLHttpRequest objects can be used to send and receive the data in various formats like JSON,XML and Text files.

The below given are the main properties of the XMLHttpRequest object

XMLHttpRequest Property Description
onReadyStateChange This is invoked whenever readystate attribute changes
readyState0- request is not generated
1- connection with the server is made
2- the server receives request
3- request is processing
4- response is received, and request is finished.
responseTextreturns the response in Text File Format
responseXMLreturns the response in XML Format
statusreturns the request status number
statusTextreturns the status details

The below given are the main methods of the XMLHttpRequest object

XMLHttpRequest Method Description
void open (method, URL)This method Opens the request specifying GET /POST method for the URL
void open (method, URL, async)This method Opens the request specifying GET /POST method for the URL for with additional parameter for asynchronous requests or not
void open (method, URL, async, username, password)This method Opens the request specifying GET /POST method for the URL for with additional parameter for asynchronous requests or not and includes username and password
void send()This method is used to send the request
void send (string)This method is used to send the request with POST method
setRequestHeader(header,value)This method is used to send the request with header values
abort() This method is used to abort the request
getAllResponseHeaders()This method returns the response header in the form of a string
getResponseHeader()This method returns the specific response header value

The abort() method of XMLHttpRequest is to be invoked to abort the current transaction

The ScriptManager provides the “IsInAsyncPostBack” property which can be used. The “IsInAsyncPostBack” property returns a Boolean value to check for partial page postbacks

The below given are the security drawbacks using AJAX

  1. AJAX source code is easy to read
  2. AJAX code can be inserted with the custom script by hackers

The below given are the common AJAX Frameworks

  1. Google Web Toolkit (GWT)
  2. JQuery
  3. Angular JS
  4. Backbone.js
  5. Ext JS

Cross-domain allows to transfer data between two or more security domains. The below given methods can be used for Cross -Domain AJAX calls

  1. Cross-Origin Resource Sharing (CROS) : This methods supports all HTTP Verbs and is supported by all web browsers
  2. JSON with padding (JSONP) : This methods supports only HTTP GET Verb and is not supported by all browsers

The below given are the main differences between JavaScript and AJAX

JavaScriptAJAX
JavaScript is a object based scripting languageAJAX uses XMLHttpRequest object for communicating with server and uses JavaScript, XML, HTML and CSS
JavaScript send and received data in synchronous wayAJAX sends the request and does not wait for the response supporting asynchronous transactions
JavaScript does not support partial page update AJAX supports partial page update

AsyncPostBackTimeout Property specifies the time (in seconds) within which the response is to be received from the server. If the specified time exceeds, then asynchronous postback timeout occurs

The default value for “AsyncPostBackTimeout” Property is 90 seconds

The below given are the ready states of a request in AJAX

0 means UNOPENED
1 means OPENED
2 means HEADERS_RECEIVED
3 means LOADING
4 means DONE

The process of retrieving near-live data regularly from a server is called AJAX polling

The below given are the main differences between Synchronous and Asynchronous Ajax requests

Synchronous AJAX Request Asynchronous AJAX Request
The request sent to the server waits for the response to complete the transaction
Blocks the JavaScript Engine until the request is completedDoes not block the JavaScript Engine
The page refresh happened whenever the request is submittedPartial page is updated with the received response and does not require page refresh
User need to wait until the request is processedUser can perform other tasks while the request is processed

The below given are the main differences between SPA and AJAX

SPA AJAX
SPA is single page application runs within the single web pageAJAX is used to communicate with server for processing the request
SPA is used to develop a standalone applicationAJAX is used to perform the back end communication for the received user request
SPA being a single page application does not communicate with different web pagesAJAX is used to transfer data among different web pages as per user action

Top 50 SQL Interview Questions and Answers

The blog provides the commonly asked Oracle RDBMS SQL Interview questions and answers for the interview preparation. SQL is Structured Query Language used by the Oracle Database Developer , Oracle DBA Administrators. The below given SQL Interview questions and answers can be helpful in preparing for Database Job Interviews for MNC IT Companies like Google, Amazon, Microsoft, Infosys , Wipro , TCS, etc.

The blog contains the basic as well as advanced questions on SQL which could be helpful for technical interviews for both freshers as well as experienced professionals

SQL Interview Questions and Answers for beginners and experienced professionals


Top 50 PL/SQL Interview Questions and Answers

The blog provides the commonly asked PL/SQL Interview questions and answers for the interview preparation. PL/SQL is mainly used by the Oracle Database Developer for writing Database specific SQL programs including Stored Procedures, functions, etc.

The blog contains the basic as well as advanced questions on PL/SQL which could be helpful for technical interviews for both freshers as well as experienced professionals.


Top 35 Oracle Service Bus (OSB) interview questions -Set 2

The blog provides the commonly asked Oracle Service Bus (OSB) Interview questions & answers to be helpful for beginners and experienced professionals.

What is the purpose of stages in Oracle Service Bus (OSB) ?

Stages are OSB Message Flow component used to contain the actions

What type of exceptions are handled by BPEL Transport Error Handling in Oracle Service Bus (OSB) ?

The BPEL Transport provides the support to communicate with the Oracle BPEL Process Manager and handles the below given exceptions:

  • Application Errors: 
  • Connection Errors
  • Other Errors

Which option to be enabled in Transport Configuration for Application retry in Oracle Service Bus (OSB) ?

The Retry Application Errors option on the transport configuration page to turn
application retries on and off

What are Routing Nodes in Oracle Service Bus (OSB) ?

The below given actions are performed by the Routing Node:

  • The Route Node is the last node in the Proxy Service
  • The Routing Node is used to route the message from Business Service and handle the response received 
  • Container for routing options are  Routing, Dynamic Routing, and Routing Table

What is Routing Table in Oracle Service Bus (OSB) ? 

The Routing Table performs the below given actions:

  • The Routing Table allows to select different routes based upon the result of a single XQuery expression
  • The Routing Table provides the set of routes wrapped in a switch-style condition table
  • Each Route includes one Routing

What is Dynamic Routing in Oracle Service Bus (OSB) ?

The Dynamic Routing is used when it is not known which service is to be invoked and to be determined at run-time of the pipeline. The dynamic routing performs the below given actions:

  • The dynamic routing is applicable for Abstracts WSDLs only
  • The Proxy Service or Business Service using the Abstract WSDL can be included for dynamic routing
  • If isProxy is set to True, the Dynamic Routing is enabled for Proxy Service
  • If isProxy is set to False, the Dynamic Routing is enabled for Business Service
<ctx: route>
<ctx: service isProxy='false'> {$routingtable/row[logical/text()=
$logicalidentifier]/physical/text()}
</ctx: service>
</ctx: route>

What are the Transport Exception Connection Errors ?

  • Naming Exception
  • Remote Exception

What is the purpose of “MessageID” or “Relates To” in Oracle Service Bus (OSB) ?

“MessageID” and “RelatesTo” are used for storing the conversation ID between Service Bus and Oracle BPEL Process Manager and ensures that all related messages
remain in the same conversation

What is the Publishing Node ? 

The Publishing Node is used to identify the target service and to configure how the message is packaged and sent to the service

What is the Publishing Table ?

The Publishing Table is used to publish a message to Zero or more  specified target services

What is Throttling in Oracle Service Bus (OSB) ?

Throttling in OSB  is termed as “regulate the flow” and helps in controlling the number of requests sent to target service

What is VETRO concept in Oracle Service Bus (OSB)?

VETRO stands for
V – Virtualization/Validation
E – Enrichment
T – Transform
R – Route
O – Operate

Which action can be used to move from one stage to another stage other than conditional logic in OSB?

The OSB provides the Skip Action which can be used at the end of the stage to move to another stage without using the conditional logic (if-then-else)

Is it possible to connect to Database without using JCA adapter ?

XQuery execute-sql() function can be used to connect to database but recommended approach is to use JCA Adapter to Database Connectivity.

How Parallel processing of the message can be achieved in Oracle Service Bus (OSB) ?

OSB provides Spilt – Join for Parallel Processing of the message. 

How the File Polling can be achieved in Oracle Service Bus (OSB) ?

The Oracle Service Bus provides the File Transport  with the usage of below given components for file polling process

  • File Mask
  • Polling Interval
  • Read Limit
  • Post Read Action

What operations can be performed using File Transport / FTP Transport when used with Proxy Service and Business Service in OSB ?

The File Transport / FTP Transport can be used for both Proxy Service and Business Service

The File Transport / FTP Transport with Proxy Service is used for Reading the Files.

The File Transport / FTP Transport with Business Service is used for Writing the Files.

What nodes can be used for reporting in Oracle Service Bus (OSB) ?

The reporting in OSB can be done using the below nodes:

  • Alert
  • Log
  • Report

What nodes can be used for Flow Control in Oracle Service Bus (OSB) ?

The Flow Control in OSB can be done using the below nodes:

  • For Each
  • If Then
  • Raise Error
  • Reply
  • Skip
  • Resume

What nodes can be used for routing  in Oracle Service Bus (OSB) ?

The Routing in OSB can be done using the below nodes:

  • Routing
  • Dynamic Routing
  • Routing Table

What nodes can be used for Message Flow in Oracle Service Bus (OSB) ?

The Message Flow  in OSB can be done using the below nodes:

  • Pipeline Pair
  • Conditional Branch
  • Operational Branch
  • Stage
  • Route
  • Error Handler

Does OSB supports Global Variable in the Proxy Service Message Flow to be accessed by another Proxy Service? 

No, The Message Flow variable are restricted to the same Proxy Service.

What are the types of Split-Join in Oracle Service Bus (OSB) ?

The Split-Join can be categorized in 2 types:

  • Static 
  • Dynamic

Does multiple route nodes supported in Oracle Service Bus (OSB) ?

No, The message flow is always associated to single Route nodes to pass the message to the Defined Business Service and get the response back.

Does OSB supports Meta Data Store (MDS) ? 

No

Does OSB supports Domain Value Map (DVM) ?

No

Does OSB provides the supports for securing the web services ? 

Yes, OSB services can be secured using OWSM policies.

How the secured web services be invoked from OSB ? 

The OSB Client Policy need to be used to invoke the secured web services? 

How the OSB Services can be applied with security policies ?

The OSB Service Policy can be applied to Proxy Service for enforcing OWSM Policies

In which scenario Service Account should be used in Oracle Service Bus (OSB) ? 

The service which are enabled with the static authentication are invoked using the service account

Does OSB supports the invocation for the Restful Services ?

Yes, Restful Services can be invoked from OSB

What is SLA alert in Oracle Service Bus (OSB)?

SLA in Oracle Service Bus stands for the ‘Service Level Agreement’ which is a contract between the Service Provider and the Service Consumer. The violation of the SLA results in SLA Alert in OSB

Does OSB supports moving large files without reading the content ? 

Yes, the Content Steaming Option in the File Transport can be used for moving large file in OSB

Does OSB allows to expose Business Service to External Services for invocation ?

No, Business Services can not be exposed. The external services can invoke the exposed Proxy Service which in turn calls the defined Business Service. 


Top 30 Oracle Service Bus (OSB) Interview questions and answers

The blog provides the commonly asked Oracle SOA Oracle Service Bus (OSB)   Interview questions & answers to be helpful for beginners and experienced professionals.

Refer the below given blog for more OSB Interview Questions and Answers

OSB Interview Questions and Answers -Set 2

What is the role of Oracle Service Bus (OSB) in SOA Suite ?

  • Oracle Service Bus (OSB) is a configuration based policy driven enterprise service to manage the SOA Life Cycle management
  • Oracle Service Bus (OSB) follows the SOA principles of developing loosely coupled standard based services executing the business functions through service consumers.
  • Oracle Service Bus (OSB) provides service discovery, service provisioning and service deployment capabilities
  • Oracle Service Bus (OSB) provides the message brokering , message transformation and message routing  across heterogenous environments

What are the features of Oracle Service Bus (OSB) ?

 The Oracle Service Bus (OSB) provides the below features:

  • Provides Service Orchestration
  • Provides location transparency 
  • Provides Message Transformation
  • Provides message processing using multiprotocol
  • Provides support for Dynamic routing of the message
  • Provides Service Level Agreement
  • Provide Service Security using OPSS and OWSM

Explain how Oracle Service Bus (OSB) supports Adaptive Messaging ? 

The Oracle Service Bus (OSB) provides support for message handling and message transformation between client and services. For instance, the Client send the SOAP message over HTTP and transforms message and invoke JMS Adapter to put the message into Queue 

Another example could be of transforming the REST/ JSON message into SOAP /XML message for processing to service consumers. 

The OSB communication patterns like Request-Response, Publish -Subscribe , Split-Join, Synchronous – Asynchronous also considered as part of Adaptive messaging.

What are the levels where Service Security can be applied in Oracle Service Bus (OSB) ? 

The Oracle Platform Security Services (OPSS) and Oracle Web Service Manager (OWSM) allows Oracle Service Bus (OSB) to apply the service security at below given levels:

  • Transport Level Security  (includes SSL , Basic Authentication /Authorization, Custom Security) 
  • Message Level Security ( includes WS-Security , SAML, UserId /Password , Encryption, Custom Security) 
  • Console Level Security ( includes Single-Sign-On , Role based Access) 
  • Policy Security

What is Service Virtualization in Oracle Service Bus (OSB) ?

Service Virtualization provides agility through message manipulation and control by providing the flexibility to control message validation, message transformation, message content based routing, message parallel processing , error handling in the message flow. 

What features are provided by Configuration Framework in Oracle Service Bus (OSB) ?

The configuration framework in Oracle Service Bus provides the below features:

  • The Configuration framework provides control over the Service Bus Environment and associated resources
  • The configuration changes made within the session does not interrupt the running services
  • The Test Control allows user to validate the resources, expressions, pipelines and split -joins 
  • The Test Control allows to execute and validate the result data
  • The Import/ Export Tool allows to move the configuration data from one environment to another 
  • The configuration framework also includes metadata -driven interface for service discovery, publishing and UDDI registry synchronization

Describe the steps for message processing in Oracle Service Bus (OSB) ?

The Oracle Service Bus (OSB) performs the Adaptive Messaging , message transformation, and route messages based on message content which includes the below given sequence of steps :

  • The Oracle Service Bus (OSB) receives the message from client though Transport Protocol
  • The Transport Provides passes the inbound message  , communicates with the client end point considering as the entry point for the message
  • The Binding Layer preforms the Pack/Unpack of the messages , manages message security and pass on the message content to the Pipeline
  • The pipeline performs validation, transformation, logging, reporting and message routing to the target end point
  • The received response is sent back to the Client

What is Proxy Service in Oracle Service Bus (OSB) ?

The Proxy Service in Oracle Service Bus acts as the interface for the service consumers that connects with managed back-end services.  Proxy Services provides “Location Transparency” through isolation of Service Consumers from Service Providers and act as a proxy layer to transport the message

The Proxy Service interface can be defined as Web Services Description Language (WSDL)  or as Web Application Definition Language (WADL) using the transport protocol.

The Proxy Service can route message to multiple Business Services as per defined interfaces.

What is Business Service in Oracle Service Bus (OSB) ?

The Business Service in Oracle Service Bus acts as the interface which connects to the service producers to perform business processes. The Business Service interface can be defined as Web Services Description Language (WSDL)  or as Web Application Definition Language (WADL) using the transport protocol.

The Business Service is similar to Proxy Service but provides additional options for message
handling, endpoint throttling, and result caching, which help improve performance.

What is OSB Service Orchestration ?

The Oracle Service Bus (OSB) provides the Orchestration where single Proxy Service can route messages to multiple Web Services  based on the message content or message operations defined as per business validation / logic.

Explain Inbound Transport Layer in Oracle Service Bus (OSB) ?

The Inbound Transport Layer acts as the communication layer between client services ( service consumers) and Oracle Service Bus and passes the inbound message (raw bytes of message)  , communicates with the client end point considering as the entry point for the message.

The Inbound Transport Layer provides support for the transport protocol like HTTP, FTP, JMS, File and other protocols.

The Inbound Transport Layer returns the response messages to the service consumers

The Inbound Transport Layer handles transport headers, message metadata, endpoint URIs

Explain Outbound Transport Layer in Oracle Service Bus (OSB) ?

The Outbound Transport Layer acts as the communication layer between external services ( service producers) and Oracle Service Bus

The Outbound Transport Layer acts passes the message (raw bytes of message) from Service Bus to Business Service or Proxy Service. 

The Outbound Transport Layer provides support for the transport protocol like HTTP, FTP, JMS, File and other protocols.

The Outbound Transport Layer returns the response messages to the service producers

The Outbound Transport Layer handles transport headers, message metadata, endpoint URIs

What functions are performed by Binding Layer in OSB message processing ?

The binding layer performs the below functions for Inbound and Outbound messages:

  • Message Pack / Message Unpack
  • Message Security
  • Move Message to the Pipeline ( Request-Response) 

What is message flow ? 

A message flow determines on how a message is going to be Validated, Transformed and routed among services. A message flow can be defined using Pipeline and Split -Join for the Parallel Processing of the message.

What is the role of Pipeline in Oracle Service Bus (OSB) ?

The pipeline determines the transformation and message routing logic  and provides message handling options ( publishing, logging, reporting, alerts, and service exception )

What are the primary elements in pipeline for the message flow ?

The pipeline includes the below given elements for the message flow: 

  • A Start Node
  • A Pipeline Pair : includes one for request and one for receiving response
  • A Branch Node: based on operations invoking specified branch for message processing
  • A Route Node: includes the target end point definition
  • An Error Handler : handles run time errors 

What is Split-Joins in Oracle Service Bus (OSB) ?

The Split-Join is useful for splitting a message payload and processing through multiple operations and the received responses are combined for get the final result. 

What are the primary elements in Split – Join for the message flow ?

The split -Join includes the below given elements for the message flow: 

  • A Start Node
  • A Receive Node : to receive inbound messages
  • A Reply Node: to send outbound messages
  • A Scope Node: creates a context that influences the behavior of enclosed elements
  • A Parallel Node: placeholder for processing branches

What are the available Service Types in Oracle Service Bus (OSB) ?

The below given are the OSB Service Types: 

  • Web Based Services:  
  • Any SOAP Service 
  • Any XML Service  
  • Messaging Service 
  • Native REST Service

What is Message Enrichment and how it is supported in OSB ?  

The Message Enrichment helps in retrieving additional information from the existing service using Service Callout option

Pass the Additional Received Information to the Inbound Message

Route the Message to invoke the Target Business Service 

Route the Message to applications supporting Java using Java Callout

 

When should we use the Message Service Type? 

The Message Service Type should be used when one of the Request or Response messages are Non-XML as Service bus cannot identify automatically and performs the SOAP Header Validation.

What are available Content Types  for the request and response message? 

The below content types are supported:

  • Binary
  • Text
  • MFL
  • XML
  • Java
  • None

What response content type is supported by File , FTP and SFTP Transport Proxy Service?

The Transport Proxy Services for Email, File, FTP, SFTP with a message service type support only one way message processing and returns NO response.  Thus, the content type for response message should be set to None

When should we use Any SOAP or Any XML Service Types in OSB ?

When a single port is to be exposed for multiple enterprise applications, Any SOAP or Any XML should be used.  

For Any SOAP , must specify the SOAP 1.1 or SOAP1.2 specification.

 

 

 

 

 

 

 


Top 10 Oracle MDS Repository Interview questions and answers

The blog provides the commonly asked Oracle SOA Meta Data Store (MDS Repository)  Interview questions & answers to be helpful for beginners and experienced professionals.

1) What is MDS in Oracle SOA Suite ?

Metadata depicts the data about data and SOA MDS stands for Oracle Meta Data Service which acts as the Central Repository for storing , retrieving the service metadata in the Oracle Fusion Middleware.  XML, XSD, WSDL, SCA Composites, BPEL Process, Oracle ADF Pages are few example of the metadata components.

2) How Oracle MDS is useful in SOA Suite ?

The below advantages are provided by Oracle MDS Repository:

  • Provides all resources to be available at the Central Repository location to be accessed by any component
  • A Change in Metadata resources provides the updated metadata to other components 
  • Avoids redundancy and ensure consistency.
  • Metadata configured during design time is used at application runtime using metadata service layer.

3) What are the types of MDS Repository?

MDS Repository can be defined as: 

  • File based MDS Repository
  • DB based MDS Repository

4) Explain File-Based MDS Repository?

MDS used file based repository by default for storing / retrieving the service metadata. The file based repository provides the below usages:

  1. File based MDS Repositories are considered light-weight 
  2. File based MDS Repository is used primarily in local environments for configuring and validating the repository integrations 
  3. Reduces integration time to connect to external Database repositories and managing all configurations locally
  4. File based repositories provides directory structure to configure and maintain the data
  5. The file-based repository is located in <JDeveloper_Home>/integration folder

5) Explain DB-Based MDS Repository?

The Database based repository provides the below usages:

  • Database repositories are primarily used for real-time integrations in production environment
  • Database repositories resides in the Database Schema ( Tables, Objects) and are created using the Oracle Repository Creation Utility (RCU)  Tool 

6)  Which configuration file is used for storing the MDS configurations?

The adf-config.xml configuration file stores the MDS Configurations

7) How many types of WSDL can be stored in MDS Repository ?

MDS Repository only stores Abstract WSDLs.

8) How can we identify which MDS repository type used for Web Service ?

The MDS Repository type is stored in adf-config.xml

  • File Based MDS: oracle.mds.persistence.stores.file.FileMetadataStore
  • DB Based MDS : oracle.mds.persistence.stores.db.DBMetadataStore

9) Describe the reason for the MDS Error: MDS-00054: The file to be loaded does not exist ? 

The oramds: reference for the WSDL document could not be evaluated at run-time

10) Explain the steps for  transferring MDS artifacts from design time to run time

The below given steps can be performed :

  • SOA Design Time MDS connection -> Transfer
  • Select the resources to Transfer ( WSDL, XSD, Target MDS Connection) 
  • Click OK 
  • Refresh the Target MDS Connection and artifacts should be available now.

 


Top 25 Oracle BAM Interview Questions and Answers

The blog provides the commonly asked Oracle SOA BAM (Business Activity Monitoring) Interview questions & answers to be helpful for beginners and experienced professionals.

1) Explain the usage of Business Activity Monitoring (BAM) in SOA Suite ?

The Business Activity Monitoring (BAM) is useful in monitoring the business activities, helps in generating business reports, provides BAM Alerts when the specified threshold is reached or surpassed. It allows to perform analytical decisioning for the business data. 

2) Describe the New and changed features in SOA 12c for Business Activity Monitoring (BAM) ?

  • BAM provides support for JavaScript Extension Toolkit (JET) treemap view
  • allows support for group filters in the group queries
  • allows  aggregated field based filters in run time filters
  • allows to pass runtime parameter value to the target dashboards through  configuration
  • allows text wrapping in table data
  • allows column width in pivot tables

3) What are the components of Business Activity Monitoring (BAM) ?

The Business Activity Monitoring (BAM) provides the below given components:

  • Oracle Metadata Services Repository
  • Persistent Engine
  • Continuous Query Service
  • Report Cache
  • Alert Service
  • Data objects and the Process Star Schema
  • BAM Dashboards

4) For what purpose BAM Adapter can be used ? 

The Oracle BAM Adapter is useful for the monitoring process 

  • Monitoring at Composite Level
  • Monitoring the full message

5) What tasks can be performed by “Viewers” in

Business Activity Monitoring (BAM) ? 

Viewers perform the below given tasks:

  • Allows to View Dashboards indicating the real-time data with collections of tables and charts
  • Allows to Filter data using Type parameter values with different values in the dashboard
  • Allows to  View Alert notification 
  • Allows to  View Alert history data

6) What tasks can be performed by “Creators” in

Business Activity Monitoring (BAM) ? 

Creators perform the below given tasks:

  • Allows to View  Alert and tasks for dashboard as per given access
  • Allows to Create projects containing set of BAM entities
  • Allows to Add data objects to existing projects
  • Allows to Create queries and KPIs to fetch data objects
  • Allows to Create Business Views to display data in tables and charts
  • Allows to Create Alerts to notify users for out of range data
  • Allows to Create parameters for filter data in the dashboard

7) What tasks can be performed by “Architects” in

Business Activity Monitoring (BAM) ? 

Architects perform the below given tasks:

  • Allows to Create & Manage BAM data objects
  • Allows to Configure Enterprise Message Sources (EMS)
  • Allows to Run data simulators
  • Allows to Import, Export , Migrate Data Objects, Enterprise Message Sources (EMS)
  • Allows to Use BAM services for managing data objects

8) What tasks can be performed by “Administrators” in

Business Activity Monitoring (BAM) ? 

Administrators perform the below given tasks:

  • Provide Access to All Viewer, Creator, and Architect tasks, for the projects based on role
  • Allows to monitor continuous queries
  • Allows to Monitor Viewsets
  • Allows to Configure BAM Server Properties
  • Allows to Configure BAM Server Availability
  • Allows to Configure BAM Diagnostics
  • Allows to Configure BAM Security
  • Allows to Run BAM scripts in test & production
  • Allows to Import, Export , Migrate Data Objects, Enterprise Message Sources (EMS)
  • Allows to Use BAM services for managing data objects

9) When is the benefit of using sensors in the BAM Adapter ?

Sensors in BAM Adapter are used when monitoring is to be done at variable or at activity level.

10) What are the possible ways for monitoring SOA Services ?

The SOA Services can be monitored using below given options

  • BAM Adapter
  • Sensors

11) What are the types of sensor actions ?

The sensor actions are primarily divided into 2 types:

  • Sensor Action
  • BAM Sensor Action

12) What is sensor action ? 

Sensor action is the action linked to sensor to perform on the sensor data to publish data to Database, JMS Queue/ Topic, Custom Java Handler.

13) What is the purpose of BAM Sensor Data ?

BAM Sensor data can be used when we need to send the sensor data to the BAM data object.

14) What is BAM Alert ?

BAM provides the Alert feature to perform action based on data insertion or data change. 

15) Is it possible to use BAM Alert to invoke external web service ?

Yes, BAM Alerts can invoke external web service.

16) What all data can be updated as when BAM11g is upgraded to BAM12c ?

The below given data objects are updated as part of Upgrade Activity 

  • Data Object Data
  • Data Object Metadata
  • Enterprise Message Sources (EMS) Metadata

17) Is it possible to migrate BAM Data Objects from Source Environment to Test or Production Environment including the configurations ?

Yes, BAM can be moved from one environment to another as Oracle Fusion Middleware provides scripts to copy an Oracle home and domains, as well as the configuration of BAM. The move plan can be updated with the environment specific properties.

18) Name the Real -Time Data Sources for Oracle BAM ?

  • Java Message Service
  • Oracle BAM Adapter
  • Enterprise Java Beans
  • Oracle Web Services
  • Oracle® Data Integrator

19) Describe the tuning option for designing Dashboard in Oracle BAM ?

The below tuning options can be performed:

  • Dashboard should be designed for specific group
  • Create a report which is “management by exception”
  • Provides user access based on role 
  • Usage of Logical Data Object filter and dashboard parameters to filter data
  • Dashboard should be restricted to 4-5 views or should have multiple tabs to reduce overall data loading time
  • Limit the Data Object List View to 2000 -3000 records

20) Describe the Tuning options for Data Archiving & Purging in Oracle Business Activity Monitoring (BAM) ? 

The below tuning options can be performed:

  • Implement Database Partition to improve overall performance
  • Data Objects should be available with the necessary data only
  • Historical data should be kept in separate data objects specific for reporting
  • Schedule data retention during non- business hours and enable alert notification
  • Use Oracle Data Integrator Service to purge the data
  • Use Alerts to allow filter based purging

21) Describe the components of Business Activity Monitoring (BAM) ?

The Business Activity Monitoring (BAM) provides the below given components:

  • Active Viewer
  • Active Studio 
  • Architect
  • Administrator

 


Top 30 Oracle SOA AQ Adapter / MQ Adapter interview questions

The blog provides the commonly asked Oracle SOA AQ Adapter / MQ Adapter  Interview questions & answers to be helpful for beginners and experienced professionals.

1) For what purpose AQ Adapter is being used in SOA Services ? 

Oracle Advanced Queue (AQ) is an Oracle Database feature provides scalable, reliable and flexible approach for bidirectional asynchronous message exchange among different applications. 

2) Does AQ Adapter supports integration with Mediator ? 

Yes, AQ Adapter can be integrated with mediator to process message to single or multiple queues. 

3) Describe the Binding properties for Oracle AQ Adapter ? 

The below given are the Oracle AQ Adapter binding properties

 AQ Adapter Binding Property  AQ Adapter Binding Property  Description
ConnectionRetryDelay indicates the waiting time for Oracle AQ Adapter to retry the connection after a connection is lost. default value is 15 sec
DequeueTimeOut indicates the waiting time after which the dequeue() API times out if no message is received on the inbound queue. The default value is 1sec
adapter.aq.dequeue.threads indicates the total poller threads that are created when an endpoint is activated. The default value is 1.

4) Which property can be used to process AQ/ MQ messages through single node in the Clustered Environment ?

We need to add singleton property in the composite.xml as given below:

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

5) Which property allows AQ Adapter messages to be processed sequentially through single node in the Clustered Environment ?

  1. Enable  singleton property for AQ adapter in cluster environment
  2. Set activtionInstances=1

6) Which property also AQ Adapter to consume the single message by multiple AQ consumers? 

The Oracle AQ Adapter enqueue header property (jca.aq.RecipientList) enables to override the recipient list (AQ subscriber separated by commas)to retrieve messages from a queue. Each consumers (AQ subscriber) must have unique values for the Recipient parameter

7) Describe the few JCA properties for Oracle AQ Adapter ? 

The below given are the Oracle AQ Adapter JCA properties

AQ Adapter JCA Property AQ Adapter JCA Property Description
QueueName indicates the AQ Queue Name
DatabaseSchema indicates the Database Schema where AQ Queue resides
SchemaValidation When set to true, payload is validated against the schema
RecipientList allows to provide multiple consumers with comma separated for dequeuing the message
Consumer consumers to dequeue the message and applicable to multiple consumer queues
DequeueCondition Can be used for Dequeue Operations. It allows to provide Boolean Expression or PL/SQL  or SQL Function to add the Dequeue Condition for retrieving messages that matches the condition. 
PayloadHeaderRequired enables when ObjectFieldName value is set to ‘true’ and allows non payload attributes of ADT to be processed as Normalized messages.
MessageSelectorRule In case of dequeueing the message from multiple consumer queue, specific conditions need to be applied to accept the message meeting the criteria. These condition can be applied using MessageSelectorRule.
Correlation dequeues the message based on the Correlation Id 
PayloadSizeThreshold indicates the payload size threshold limit 

8) What are the supported ADT Types in AQ Adapter ?

The below given types are supported for ADT in AQ Adapter

BLOB FLOAT VARCHAR2
CLOB INTEGER DOUBLE PRECISION
CHAR NUMBER TIMESTAMP
DATE REAL  
DECIMAL SMALLINT  

9) What are the supported Payload  Types in AQ Adapter ?

The below given types are supported for Payload in AQ Adapter

  • CLOB
  • VARCHAR2
  • BLOB
  • XMLTYPE

10) Which property allows support for multiple threads in AQ Adapter ? 

Set the value for adapter.aq.dequeue.threads property to increase the total poller threads that are created when an endpoint is activated. Default value is 1.

11) Which property determines the  waiting time for the Dequeue Polling threads?  

Set the DequeueTimeOut property in the composite.xml to with the time Dequeue() API waits before starting the dequque polling threads.

<property name="DequeueTimeOut" type="xs:integer" many="false"override="may">10
</property>

12) Does AQ Adapter supports stream payload and how it can be achieved ? 

Yes, the Oracle AQ Adapter provides support for streaming the payload and allows to stream to database instead of using SOA run time in memory as DOM. The below property need to be added in the .jca file

<activation-spec className="oracle.tip.adapter.aq.inbound.AQDequeueActivationSpec">
<property name="QueueName" value="TEST_AQ_INBND_Q"/>
<property name="DatabaseSchema" value="AQTESTSCHEMA"/>
<property name="EnableStreaming" value="true"/>
</activation-spec>

13) For what purpose MQ Adapter is being used in SOA Services ?

Message queuing is the communication method where independent applications communicate through message data on a distributed system. The message is sent to the queue by the application, owned by a queue manager and other applications can retrieve the message from the queue.

Messaging: In synchronous commination, message sent by one application is retrieved by another application. The sender application waits for the reply to ensure message is read by another application.

Message: Message is a structured data agreed by the application for send/receive communication.

Message Queue: Message queue is an object that stores the message.

Queue Manager: A queue manager provides the messaging services to the applications using application programming interface.

Message Channel: provides the communication path between 2 queue managers.

Transmission Queue: used to temporary store message that are destined for remote queue manager. 

Message Segment:  Large messages are divided into small messages called message segment.

Message Group: indicates the set of related messages with the same Group Id.

14) What is the message structure of the MQ Series message ? 

 The MQ Series message includes the below details

  • Message Header:  includes the header details for the message like Message Id, Message Type, Message Priority, routing information
  • Optional Header:  includes additional details as part of message header
  • Application Data: Message in the form of structured data to be processed.

15) Which property is required to process group messages using MQ Adapter ?

Group Messages indicates the set of related messages with the same Group Id. MQ Series Adapter enabled with Group messages cannot process non-group messages in the queue and thus will not be picked for processing. 

The below property can be added in the composite.xml for enabling group messages

<property name ="ProcessGroupMessages" value ="true"/>

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

Oracle MQ Series Adapter provides the parameter to control the number of threads that dequeue the messages from the inbound queue. 

Set the Value for InboundThreadCount  =’N’  in the .jca file where N is the Number of threads to be considered

17) Describe advantages of MQ Series Adapter over JMS Adapter ?

The MQ Series Adapter provides the below advantages: 

  • The Oracle MQ Series Adapter supports Positive Action Notification (PAN) and Negative Action Notification (NAN)
  • The Oracle MQ Series Adapter supports report messages like message delivery, message arrival, exception report, message expiry report.
  •  The Oracle MQ Series Adapter supports sending unwanted or corrupted messages to a dead-letter queue
  •  The Oracle MQ Series Adapter provides advanced filter options, such as filtering message belonging to a group
  • The Oracle MQ Series Adapter is faster and easier to use

18) What are the operations supported by MQ Adapter when used with BPEL /Mediator ?

The below given operations are supported:

  • Enqueue message
  • Dequeue message
  • Request -Response
  • Outbound Queue

19) Does MQ Adapter support message communication using SSL Protocol ?

Yes, MQ Adapter supports SSL communication and below given properties must be set 

  • SSL Enable
  • KeyStoreLocation
  • KeyStorePassword
  • TrustStorePassword
  • Protocol
  • KeyStoreProviderName
  • KeyStoreType
  • KeyStoreAlgorithm
  • CipherSuite

20) Does MQ Adapter supports XA Transactions ?

Yes, MQ Adapter supports both Inbound and Outbound XA Transactions. The below steps need to be performed in the Weblogic Application Server to enable XA Transactions

  • Click Domain Structure -> Deployments
  • Click MQ Series Adapter -> configuration -> Outbound Connection Pools
  • Select javax.resource.cci.ConnectionFactory for eis/MQ/MQAdapter
  • Select XA Transaction and set value as true

Enable the below property in the composite.xml for Inbound XA Transactions

<property name="bpel.config.transaction">required</property>

21) Does MQ Adapter support retry mechanism and how it can be achieved ?

The Retry mechanism is supported by MQ Adapter can be achieved using below given approach

  • JCA Inbound Retry Mechanism: The JCA Retry mechanism is supported by other adapters and supports retry for connection failure. With MQ Adapter, it also supports retry to put the message into a queue.
  • Message Backout Queue: is used for storing the rejected messages from the Inbound message queue for retry. The maximum messages can be placed as per the MaximumBackoutCount property value which defines the count for rejected messages in the back out queue.

22) What are the properties required to enable Backout Queue in the Inbound MQ Adapter Service ?

The below properties need to be added in the .jca file for Inbound MQ Adapter

<property name="BackoutQueueName" value="BACKOUT.QUEUE"/>
<property name="MaximumBackoutCount" value="5"/>
<property name="BackoutRetries" value="3"/>

23) Does MQ Adapter supports reading message as  attachment ?

Yes, MQ Adapter supports reading messages as attachment.  

24) How partial delivery is supported by MQ Adapter ?

The partial delivery in MQ Adapter is applicable when a single message is to be transmitted to multiple queues.

When partial delivery is set to true, then even if the message is failed for some queues, it will still put the message in the remaining queues. 

When partial delivery is set to false, if message delivery fails for even a single queue, the message processing is stopped for other queues also.

25) What are the types of reports supported by MQ Adapter ?

The below given reports can be retrieved as message processing

  • Confirmation on Arrival
  • Confirmation on Delivery
  • Exception Report
  • Expiry Report
  • Positive Action Notification (PAN)
  • Negative Action Notification (PAN)

26) Describe the header properties that can be used to filter the dequeue message in MQ Adapter ?

The below given header properties can be used to filter the dequeued message based on Message Id and Correlation Id

  • jca.mq.MQMD.MsgId: indicates the message filter option based on the Message Id (hexadecimal-encoded value)
  • jca.mq.MQMD.CorrelId: indicates the message filter option based on the Correlation Id (hexadecimal-encoded value)

27) What message types are supported by MQ Adapter ?

The below given are the MQ Adapter supported message types:

  • Normal Message : indicates the message without no response required
  • Request Message: indicates the message without response required
  • Reply Message: message sent by a program in response to a request message
  • Report Message: message indicating the confirmation of message received or message failure details

28) what actions can be taken on the message delivery failure for MQ Adapter ?

The message delivery failure can be handled in the below given ways:

  • Place message on a dead letter queue: storing the rejected / failed message to a backout / dead letter queue for retry
  • Discard message

29) Which property is required to enable large payloads for the Inbound MQ Adapter ?

Select the option – Use Large Message Support  while configuring inbound MQ Adapter for large payloads

30) Which property is required to enable large payloads for the Outbound MQ Adapter ?

The below given configurations options can be provided to support laerge payloads for outbound MQ Adapter

  • SegmentIfRequired: If the property SegmentIfRequired set to true, then Allow message to segmented when necessary and becomes useful for large payloads processing
  • MaximumSegmentLength : allows to provided the maximum length to be provided for each segment . Be default, set to ‘Maximum Allowed’

31) Which property manages the Oracle AQ Adapter Inbound retries ?

The jca.retry.count property can be specified with the Number of retries . 

When jca.retry.count property is enabld, ensure the max_retries value is updated properly in the queue. 


Oracle SOA Top 25 JMS Adapter interview questions

The blog provides the commonly asked Oracle SOA JMS Adapter  Interview questions & answers to be helpful for beginners and experienced professionals.

1) What is JMS used for ?

Java Message Service (JMS) is an API used for Reading /writing messages to / from message queues . JMS is loosely coupled, reliable and provides asynchronous message communication.

2) What are the advantages of using JMS for message communication ?

The below given are the advantages:

  1. Asynchronous: Message sent to the message queue does not require immediate response.  
  2.  Reliable: message assurance to subscribers.

3)  What are the JMS elements ?

The below given are the JMS elements: 

  1. JMS Provider:  implementation of the JMS interface for message-oriented middleware (MOM) like Java programs, JMS Adapter.
  2. JMS Client: JMS application that produces/receives messages.
  3. JMS Producer/ Publisher: JMS Client that send messages.
  4. JMS Consumer/Subscriber: JMS Client that receive messages.
  5. JMS Message: The JMS object that contains the message to be transferred between JMS Clients.
  6. JMS Queue: Its an staging area for storing sent messages which are waiting to be read 
  7. JMS Topic:   Message distribution technique where single published message is delivered to multiple subscribers

4) What is JMS Connection factory ?

The JMS Connection Factory is an object that a JMS client such as  java program or service that uses JMS API to create connections to the associated JMS provider of JMS destinations, for both point-to-point and publish/subscribe messaging.

5)  How Persistent Store is used for Java Messaging Service (JMS) ?

The persistent store provides a built-in, high-performance storage solution for WebLogic Server subsystems and services that require persistence. Weblogic Server provides the below given persistence stores
1. File stores
2. JDBC accessible stores

Persistent storage provided high performance as a single resource by the transaction manager even if the transaction involves multiple services that use the same store

6) What are the supported Models by JMS API  ?

The JMS API Supports below given JMS Models:

  1. Point-to-Point Model:
  • indicates one-to-one message processing 
  • The message are build on the concept of message queue.
  • Each message is addressed to a specific message queue
  • The client creates the JMS connection factory to connect to particular JMS Queue
  • Multiple producers can send the message to the same message queue
  • Only one consumer to read the received messages
  • Queue retains the message until it is read by the consumer and thus assures message is guaranteed to be delivered.

  2. Publisher-and-Subscriber Model: 

  • The Publisher sends the message to a specific message topic
  • The client creates the JMS connection factory to connect to particular JMS Queue
  • Multiple subscribers can subscribe to the same message
  • The publisher is required to create a message topic for clients to subscribe
  • The subscriber has to remain continuously active to receive messages, unless it has established a durable subscription.
  • If the subscriber is not active, then the message is delivered when it reconnects to the message topic.

7) Is it possible to add custom JMS header properties while sending messages to JMS Queues/ JMS Topic ?

Yes, JMS header properties can be customized.

8) What are the supported message types by JMS ?

  • Text Messages:  The JMS message supporting the text message body
  • Stream Messages: The JMS message supporting the primitive data types in the Java programming language.
  • Map Messages: The JMS message that contains a set of name-value pairs, where the names are String objects, and values are Java primitives
  • Bytes Messages : The JMS message that contains the a stream of uninterrupted bytes
  • Object Messages :  The JMS message that contains a serializable Java object in its message body

9) Describe the steps for creating Durable JMS subscriber in Weblogic ?

How to create durable JMS Subscriber in Weblogic Server

10) Is Oracle JMS Adapter a transactional or non -transactional adapter ? 

Oracle JMS Adapter is a transactional adapter. 

11)  What are the exceptions that can be thrown in the JMS message processing? 

The JM Exception Class  handles the few below given exceptions in the JMS API 

  • IllegalStateException
  • InvalidClientIDException
  • InvalidDestinationException
  • InvalidSelectorException
  • JMSSecurityException
  • MessageEOFException
  • MessageFormatException
  • MessageNotReadableException
  • MessageNotWriteableException
  • ResourceAllocationException
  • TransactionInProgressException
  • TransactionRolledBackException

12) Is Oracle JMS Adapter  DOM2 complaint ? 

Yes, Oracle JMS Adapter can process and generate document objects that are compliant with DOM2 specification

13) What are the types of acknowledgments that can be sent by the JMS publisher ?

There are 3 types of acknowledgements sent by JMS Publisher: 

  1. DUPS_OK_ACKNOWLEDGE : informs about the Duplicate message.
  2. AUTO_ACKNOWLEDGE : acknowledgment for the receipt of the message
  3. CLIENT_ACKNOWLEDGE: acknowledgment by the client for the message

14) Explain the parameters that are required to be set in the Delivery Failure Tab ?

The below given are the parameters to be set for JMS delivery failure:

  1. Redelivery Delay Override:  indicates the Time interval between retries (millisecs)
  2. Redelivery Limit:  indicates the number of retries
  3. Expiration Policy: indicates when the message is lost or expired.
  4. Redirect: redirect message to different queue.
  5. Log: logging  the message.
  6. Discard:  indicates that the message is discarded and will not be retained. 
  7. Error Destination: indicates the “queue” name when selected “redirect” for sending failed messages.

14) What is JMS administered object?

JMS administered object is a pre-configured JMS object that is created by an administrator for the use of JMS clients and placed in JNDI namespace.

15) What is the purpose of message selector in JMS Adapter? 

The message selector in the JMS Adapter allows to perform filtering while subscribing to JMS message queue / JMS message topic. 

16) What are the binding properties for Oracle JMS Adapter ? 

The below given are few of the binding properties for Oracle JMS Adapter:

JMS Binding Property JMS Binding Property Description
adapter.jms.encoding used for JMS message encoding for Inbound and Outbound messages
adapter.jms.DistributedDestinationConnec
tionEveryMember
When Enabled(True) , JMS Adapter create a consumer/subscriber for each member of the distributed destination on a remote cluster or a server on remote domain
adapter.jms.receive.threads indicates the number of poller threads that are
created when an endpoint is activated. Default Value is 1.
adapter.jms.receive.timeout the timeout value used for the synchronous receive call. Default Value is 1sec.
adapter.jms.registration.interval not supported anymore.
adapter.jms.retry.interval indicates the waiting time for Oracle Inbound JMS Adapter before trying to re-create a connection after a connection is lost. The default value is 30s
JMSReplyToDestinationProperties indicates if custom property settings can be applied on Destination objects received during inbound request/reply messages.
JMSReplyUseCorrelationIdForCorrelation indicates if a correlation ID for correlation is applied or not. 
JMSReplyUseMessageIdForCorrelation indicates if a message ID can be used for correlation
JMSReplyPropagateJMSExpiration indicates the message expiration time.  If set to 0, message never expires.
RequestReply.cacheReceivers indicates if the same number of JMS receivers are used for the same request destination repeatedly
RequestReply.useCorrelation If enabled, applies the message selector for filtering the received messages. . If the request Normalized Message property jca.jms.JMSCorrelationID is specified, then it is used for correlation, otherwise the JMS Message ID property is used
SuppressHeaders If true, then JMS headers are bypased.

17) Does JMS Adapter supports normalized messages ? 

Yes, JMS Adapter supports normalized message processing.   Normalized message are divided into properties and payload where properties are name-value pairs.

Oracle JMS Adapter facilitates asynchronous request/response by providing the correlationId and the JMSReplyTo address as JMS headers

18) Is it possible to track the message size using JMS Adapter ?

Yes, The Oracle JMS Adapter calculates the message size and sends the message size to the JCA Binding Component from where it can be retrieved for reporting.

19) Does JMS Adapter supports streaming large payloads ? 

Yes, large payloads can be processing using JMS Adapter.  Select the Enable Streaming Check box in the Consume Operations Parameters during design-time to get it appended in the Activationspec in the .jca file

When enabled JMS Adapter to process large payloads , the payloads are streamed to Database instead of SOA run time as in a memory DOM. 

 <activation-spec className="oracle.tip.adapter.jms.inbound. JmsConsumeActivationSpec">
<property name="DestinationName" value="jms/JMSCustomerInQueue"/>
<property name="UseMessageListener" value="false"/>
<property name="PayloadType" value="TextMessage"/>
<property name="EnableStreaming" value="true"/>
</activation-spec>

20) Name the property in JMS Adapter to support Multiple Consumer Threads ?

adapter.jms.receive.threads property in the composite.xml to support multiple poller threads of the JMS Inbound Message Flow.
Multiple poller threads dequeue message using round robin technique which improves the overall performance.

21) Which property is required to be enabled when JMS Adapter is connected to distributed destination on a remote cluster or a server on remote domain ?

The adapter.jms.DistributedDestinationConnectionEveryMember property is the Service binding property for the JMS Adapter.
Set adapter.jms.DistributedDestinationConnectionEveryMember to True in the composite.xml when JMS Adapter creates a consumer/subscriber for each member of the distributed destination.

<property name="adapter.jms.DistributedDestinationConnectionEveryMember"
type="xs:string" many="false" override="may">false</property>

22) What are the available XA and Non- XA based Connection factory for JMS Adapter in Weblogic Server? 

When JMS Adapter requires to have a connection factory in a global transaction, then XA-based connection factory is to be used, else non-XA based connection factory.

• QueueConnectionFactory
• TopicConnectionFactory
• ConnectionFactory
• XAQueueConnectionFactory
• XATopicConnectionFactory
• XAConnectionFactory


Oracle SOA Top 20 File / FTP Adapter Interview questions & answers

The blog provides the commonly asked Oracle SOA File  Adapter / FTP Adapter Interview questions & answers to be helpful for beginners and experienced professionals.

1) what is the major difference between File Adapter and FTP Adapter ? 

File Adapter integration is useful when performing file operations from /to the local file system.

FTP Adapter integration is useful when performing file operations from /to the remote  file system

2) What are the operations provided by File Adapter ? 

 File Operation Name   File Operation Description
Read File  Inbound Operation
Write File  Outbound Operation
Synchronous Read File Outbound Operation
List File Outbound Operation

3) What are the operations provided by FTP Adapter ? 

 FTP Operation Name   FTP Operation Description
Get File  Inbound Operation
Put File  Outbound Operation
Synchronous Get File Outbound Operation
List File Outbound Operation

4) What are the file formats supported by File Adapter / FTP Adapter ?

The Oracle File and FTP Adapters can read and write the below given file formats

  1. XML (both XSD- and DTD-based)
  2. Delimited
  3. Fixed positional
  4. Binary data
  5. COBOL Copybook data

5) Does File Adapter / FTP Adapter supports Native format ?

Yes, File Adapter / FTP Adapter supports native format as opaque objects (such as Jpgs and GIFs)  and pass the contents in their original format without performing transformation.  

6) Describe the common File Adapter Inbound parameters in the .jca configuration ? 

<adapter-config name="fileInboundReference" adapter="file" wsdlLocation="../WSDLs/fileInboundReference.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory UIincludeWildcard="cust*.txt" location="eis/HAFileAdapter"/>
<endpoint-activation portType="Read_ptt" operation="Read">
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property name="PhysicalDirectory" value="C:\tmp"/>
<property name="UseHeaders" value="false"/>
<property name="MinimumAge" value="0"/>
<property name="Recursive" value="true"/>
<property name="PollingFrequency" value="60"/>
<property name="DeleteFile" value="true"/>
<property name="IncludeFiles" value="cust.*\.txt"/>
</activation-spec>
</endpoint-activation>
</adapter-config>

7) How single Threaded Model is supported in File Adapter / FTP Adapter ? 

The File /FYP Adapter used the global pool of processor for executing file processing.  The single Threaded Model modifies thread execution by not using the default pool processor and allows poller thread to process the file in the single running thread. The below configuration can be updated in the File / FTP Adapter .JCA file.

<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="SingleThreadModel" value="true"/>
<property../>
</activation-spec>

8) How Partitioned Threaded Model is supported in File Adapter / FTP Adapter ? 

The partitioned thread model is the modified thread model which allows each composite application to use in-memory queue in the partitioned form. The below configuration can be updated in the File / FTP Adapter .JCA file.

<activation-spec
className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="ThreadCount" value="4"/>
<property../>
</activation-spec>

9) What are the available File Polling Options ?

The Oracle File / FTP Adapter provides the below polling configurations

  1. Polling Frequency: Define the time after which File / FTP Adapter check for polling the file.
  2. Minimum File Age : The Oracle File / FTP Adapter reads the file which are older than the minimum age value (determined by the last modified time stamp)  in the directory. This option is useful when large file which take 3-4 mins to be copied are to be polled for processing . In that case, Minimum file Age is to be set as 5 mins so that such files can be read without failure.
  3. Use Trigger File: The Oracle File / FTP Adapter starts file polling when specified file is available in the local or remote file system. 

Consider an example where BPEL Process1 writes the file into the directory and BPEL Process2 read those files for processing.  In this case, trigger file option could be useful.

File Adapter Polling Configuration

10) what is the difference between Physical Directory and Logical Directory in File / FTP Adapter  processing ?

Physical Directory Path:
1. requires the full directory path from where the file is to be picked for polling.

2. requires manual change in the directory path when deployed to different environments.

Logical Directory Path:

  1. can provide logical name and path value in the composite.xml
  2. logical path can be change from em console.
  3. can replace the logical path in case of deployment to different environment using Config plan.

11) What is the difference between Read and Sync Read operation

in File / FTP Adapter  processing ?

Read Operation: The File /FTP Adapter uses Read operation for polling the file to read its content. 

Sync Read Operation:  The File /FTP Adapter uses SyncRead operation to read the file in between the flow when requires to perform Synchronous communication

12) Does File Adapter / FTP Adapter supports polling from multiple directory ?

Yes, polling from multiple directories is supported by File / FTP Adapter in a single activation for both Physical and Logical Directory Path. The multiple directory can be set during design time using JDeveloper. 

13) Is File Adapter / FTP Adapter  transactional and non-transactional adapters ?

Transactional Adapters: Database Adapter, JMS Adapter, AQ Adapter, MQ Adapter
Non- Transactional Adapters: File Adapter, FTP Adapter

14) what is File Debatching Process in File / FTP Adapter ? 

The File / FTP Adapter allows to read multiple messages in a file using Debatching which provides the option to to publish messages in a specific number of batches.
During Debatching, the file reader, on restart, proceeds from where it left off in the previous run, thereby avoiding duplicate messages. 

16) Can we append to existing file using File / FTP Adapter ? 

Yes.

16)   File / FTP Adapter allow to read the file without reading its content?

Yes, File / FTP Adapter provides the option for the Read operation. 

Select Operation: Read

Select Check box:  Do not read the file content

File Adapter Read Operation

17)  What Inbound Header metadata is published by File Adapter in the Inbound Service ?

The File Adapter publishes the below given inbound metadata as part of Inbound Header

File Adapter Inbound Header  Inbound Header Description 
jca.file.FileName name of the file
jca.file.Directory directory name for the file
jca.file.Batch indicates unique batch name in case of debatching
jca.file.BatchIndex indicates batch index for each message within the batch for debatching
jca.file.Size size of the file
jca.file.LastModifiedTime last modified time for the file

File Adapter Inbound Header Metadata

18) Provide the steps to specify the dynamic outbound directory name ?

  1. Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
  2. Provide the Physical Directory name as C:\ReadFileDir
  3. Double-Click Invoke Activity
  4. Select Browse Variables -> Variable Choose Dialog 
  5. Select Create an Object icon 
  6. Create Variable newOutboundDir, type xsd:string
  7. Now drop Assign Activity between Receive and Invoke Activity
  8.  Perform Copy Operation, Select Expression and set the value as C:\ReadFileOutDir
  9. Now Select Invoke Activity -> Properties 
  10. Select jca.file.Directory and set value  as newOutboundDir and Type as input

19) Provide the steps to specify the dynamic outbound file name ?

  1. Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
  2. Provide the Physical Directory name as C:\ReadFileDir
  3. Double-Click Invoke Activity
  4. Select Browse Variables -> Variable Choose Dialog 
  5. Select Create an Object icon 
  6. Create Variable newOutFileName, type xsd:string
  7. Now drop Assign Activity between Receive and Invoke Activity
  8.  Perform Copy Operation, Select Expression and set the value as customer.txt
  9. Now Select Invoke Activity -> Properties 
  10. Select jca.file.Directory and set value  as newOutFileNameand Type as input

20) Does Debatching support native format and XML ?

Yes , debatching support boith XML and native format for multiple message processing.

21) What is ChunkedRead feature in File / FTP Adapter?

The File / FTP Adapter allows processing of large files using the ChunkedRead feature which uses an invoke activity within a while loop to process the target file. File processing using ChunkedRead  does not throw an exception in case of Invalid Payload and the return header contains the translation exception message indicating the line and column where error is encountered in the below given header fields

  • jca.file.IsMessageRejected
  •  jca.file.RejectionReason
  •  jca.file.NoDataFound

22) Explain UseStaging property in File Adapter / FTP adapter?

The UseStaging property can be set in the File Adapter / FTP Adapter .JCA File.

If UseStaging property set to true, then 

  1. The Oracle outbound File Adapter / FTP Adapter writes data to staging file.
  2. Streams the Staging File data to the Target File

If UseStaging property set to false, then outbound File Adpater / FTP Adpater does not use staging and transfers the file from source file location to target file location


Top 30 Java Array Interview Questions & Answers

Java array is the most important and commonly asked topic in programming interview questions. The Tutorial shares the top 30 java array interview questions and answers for IT exam or interview preparation. Java Array is one of the used data structure in java programming and thus important for beginners and experienced programmers to possess clarity on java array implementation.

1. What is an Array in java ?

  • Java Array is the data structure with the collection of elements to organize and store the objects sequentially.
  • Array in java uses index for each position. Array Index starts from 0 position.
  • Array stores the collection of elements with the similar data types.
  • Array are fixed in length and thus not expandable in size.
  • Array objects in java are stored in the heap memory and not on the stack.
  • Arrays can be categorized as 1-dimensional array, 2 -dimensional array, N-dimensional array.
  • Arrays in java are implemented in other data structures like List, Heap, Hash Tables, Queues, Strings.
  • The simplest example of Array data structure could be a linear array (also called 1-dimensional array)

2. What are the advantages and disadvantages of array in java?

Advantages:

  • Arrays in java provides fast lookup (retrieval / traversal) of elements using index.
  • Array retrieval takes o(1) times irrespective of the array length
  • Appending array with new element at the end of the array works faster , takes O(1) time.

Disadvantages:

  • Arrays in java are of fixed length and thus cannot be expandable at run time.
  • Collection of elements in array should be of same data type.
  • Array insertion and Array deletion take O(n) time and thus makes the operation costlier with respect to execution time.

Below given are the Array operations and their execution time.

Array OperationsArray Execution Time
Array SpaceO(n)
Array Lookup / RetrievalO(1)
Array Append (last element) O(1)
Array Insertion O(n)
Array Deletion O(n)

3. How the array is stored ?

Array is an object in the java and it is being stored in the heap memory in the JVM

4. Can the array be declared without size?

No. Array is fixed length in java and need to be initialized with size.

5. Does Array allows adding string value into Integer Array ?

We know that Arrays in java is the collection of elements with the same data type. Thus , storing string value in Integer Array gives the compile time error.

package core.java.oracleappshelp.array;
public class AssingStringToIntArray {
	 public static void main(String args[]) {
			int[] assingIntValue = new int[5];
			assingIntValue[0] = "Mohit";   //compile time error
	 }
}

6. Explain ArrayStoreException and hierarchy in Java Array ?

The ArrayStoreException exception occurs when the object is stored with a different data type which is not same as per the defined array object. Let’s consider another example. Create an Array of object assigned with String [ ] . Add the integer value. In this case, although compiler doesn’t give compile time error but it does generates ArrayStoreException  at the run-time.

package core.java.oracleappshelp.array;
public class ArrayStoreExceptionExample {
	public static void main(String[] args) {
        Object[] students = new String[10]; 
        students[0] ="Rohit";
        students[1] ="Mohit";
     // assignment of integer generates ArrayStoreException at run time.
        students[2] = new Integer(0);         
	}
}
Program Output:
Exception in thread "main" java.lang.ArrayStoreException: java.lang.Integer
	at core.java.oracleappshelp.array.ArrayStoreExceptionExample.main(ArrayStoreExceptionExample.java:8)

ArrayStoreException Class Hierarchy:

java.lang.Object
↳ java.lang.Throwable
    ↳ java.lang.Exception
        ↳ java.lang.RuntimeException
            ↳ java.lang.ArrayStoreException 

Constructors of ArrayStoreException:

  • ArrayStoreException(): Constructs an ArrayStoreException instance with no detail message.
  • ArrayStoreException(String storeExcMessage): Constructs an ArrayStoreException instance with the specified message

7. What are the common errors / exceptions in Arrays ?

  • NullPointerException : when value accessed is retrieved as NULL at run-time.
  • NegativeArraySizeException when array is identified with a negative size
  • ArrayIndexOutOfBoundsException : When array is accessed or modified with a invalid index or index value is idnetiifed more than the array size.
  • ClassCastException :
package core.java.oracleappshelp.array;
public class ArrayClassCastExceptionExample {
		public static void main(String[] args) {
			Object storeIntValues = new Integer(10);  
			System.out.println((String)storeIntValues);            
		}
	}
Program Output: 
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
	at core.java.oracleappshelp.array.ArrayClassCastExceptionExample.main(ArrayClassCastExceptionExample.java:6)

ArrayStoreException: Refer the above question explained with the example.

8. What is the default array value for different data types ?

Java Data TypeDefault Array Value
byte, short,int,long0
float, double0.0
boolean false
Objectnull

9. Is Generics use supported in array ?

No

10. Define anonymous array in java ?

The Array which does not have a name or reference is termed as anonymous array in java.

new String[]{“Open”, “Close”, “Save”};

new int[] {100,200,300,400,500};

11. What are jagged arrays in java ?

Arrays containing arrays with different size are termed as jagged arrays.

Example: Multi-dimensional arrays included Jagged arrays.

12. Can the array with higher size be assigned to an array with less size ?

Yes, arrays support this feature. If an array1 has size of 10 elements and array2 has size of 5 elements, then array1 can be assigned to array2 even though it has less element size as array validation checks for the array to be of same data type and does not validate on the array size during compilation.

import java.util.*;
public class CopyLargeArrayToSmallArraySize{
	public static void main(String args[]) {
		int[]  arrayWithLessSize = new int[20];
		int[]  arrayWithLargeSize = new int[40];
		arrayWithLessSize = arrayWithLargeSize;
		System.out.println(arrayWithLessSize.length);
    }
}

13. Write a java program to sort an array and print in java ?

The below java program uses Arrays.sort( ) method to sort the numbers in array

package core.java.oracleappshelp.array;
import java.util.Arrays;
public class arraySortingInJava {
	public static void main(String[] args) {
	    int[]  numberList = { 700, 100,500,900,50 };
	    Arrays.sort(numberList);
	    for (int traverseList : numberList)
	        System.out.print(traverseList +" ");
	}
}
Array Program Output:
50 100 500 700 900 

14. what are the possible ways to copy array content from one array to another ?

The below given methodologies can be applied in java for copy array content

  • Using for loop to traverse and copy the content
  • Using clone( ) method
  • Using Arrays.copyOf( ) method
  • Using System.arraycopy ( ) method

15. Describe the differences between Array and ArrayList ?

http://oracleappshelp.com/main-differences-between-array-and-arraylist-in-java/

16. What will be the ouput for an Array which is not initialized ?

The Array will be assigned with the Default Value based on the Array Data Type

17. Write a java program to identify duplicate array elements in java ?

package core.java.oracleappshelp.array;
public class IdenitfyDuplicateArrayElements {
/* Method Name - getDuplciateArrayElements 
 * Java method to identify the duplicate array elements from the received any input.
 */
public static void getDuplciateArrayElements(String[] studentNames) {
	    for(int outerLoop=0; outerLoop < studentNames.length-1; outerLoop++){
	        for(int innerLoop=outerLoop+1; innerLoop < studentNames.length; innerLoop++) {
	            
	            if(studentNames[outerLoop].equals(studentNames[innerLoop]) && outerLoop!=innerLoop ) {
	                System.out.println("Idneitifed duplicate array element  is : "+ studentNames[innerLoop]);
	            }
	        }
	    }
		
	}
	 public static void main(String args[]) {
		    String[]  studentNames = {"Roit", "Mohit", "Vinay", "Mohit", "Akshay" };
		    getDuplciateArrayElements(studentNames);
		  }
}

18. Is an array thread-safe in java ?

  • Array operation is java have their complexity.
  • Array Retrieval is thread-safe.
  • Array insertion, updation and deletion are not thread-safe.

19. Can array be made volatile ?

Only variable representing an array can be made volatile

20. Write a java program to check if the given two arrays are equal or not ?

The below given program uses Arrays.equal( ) method to validate if the comparison of two arrays is equal or not.

package core.java.oracleappshelp.array;
import java.util.Arrays;
public class ArraysComparison {
	public static void main(String[] args) {
		int[]  arrayObject_1 = { 700, 100,500,900,50 };
	    int[]  arrayObject_2 = { 700, 100,500,900,50 };
	    int[]  arrayObject_3 = { 100, 200,500,900,50 };
	    System.out.println(" Is Array Object 1 Equals to Array Object 3" + Arrays.equals(arrayObject_1 , arrayObject_2));
	    System.out.println(" Is Array Object 1 Equals to Array Object 3" + Arrays.equals(arrayObject_1 , arrayObject_3));
	    System.out.println(" Is Array Object 2 Equals to Array Object 3" + Arrays.equals(arrayObject_2 , arrayObject_3));
	    }
	}
    
Array Program Output: 
 Is Array Object 1 Equals to Array Object 3 true
 Is Array Object 1 Equals to Array Object 3 false
 Is Array Object 2 Equals to Array Object 3 false

21. How many ways multi dimesional arrays can be created in java ?

Multi Dimesional arrays in java could be 2D, 3D and 4D . Below given are the few examples of creating multi dimesional arrays in different ways

/* 2 Dimesional Arrays */

int[][] twoDimesionalArray1;
int twoDimesionalArray2[][];
int[] twoDimesionalArray3[];

/* 3 Dimensional Arrays */

int[][][] threeDimesionalArray1;
int threeDimesionalArray2[][][];
int[] threeDimesionalArray3[][]; 
int[][] threeDimesionalArray4[];

/*4 Dimesional Arrays */

int[][][][] fourDimesionalArray1;
int fourDimesionalArray2[][][][];
int[] fourDimesionalArray3[][][];
int[][] fourDimesionalArray4[][];
int[][][] fourDimesionalArray5[];

22. How to convert an array to arrayList in java ?

The below apprach can be used for converting an array to arrayList in java

  • Using Arrays.asList() method
   String studentNames[]={"Mohit", "Rohit", "Snehashish", "Akshay"};
   /* Using Arrays.asList() method to convert array to ArrayList */
   ArrayList<String> studentList= new ArrayList<String>(Arrays.asList(studentNames));
  • Using Collections.addAll() method
String studentNames[]={"Mohit", "Rohit", "Snehashish", "Akshay"};
/* Create ArrayList studentList*/
ArrayList studentList= new ArrayList();
/* Using Collections.addAll() method to convert array to ArrayList */    
 Collections.addAll(studentList, studentNames);

23. How to find the Second Largest Number in the Array in java ?

The below steps can be performed to identify the second largest array element in java

  • Intitialize the array with the array elements
  • Sort the Array by using Arrays.sort() method
  • The last Number is the Array is the largest number after sorting
  • Traverse the array elements from 0 to n-2
  • compare the array element with the last element in array
package core.java.oracleappshelp.array;
import java.util.Arrays;
public class SecondLargestNumInArray {
	 public static void main(String[] args)
	 {
	  int studentRollNo[] = new int[] {101,21,45,51,19,2};
	  // Call Arrays.sort() method 
	  Arrays.sort(studentRollNo);
	  // Traverse the StudentRollNo Array till Second last element
	  for(int loop=0; loop < studentRollNo.length; loop++) {
	      // Print second last element
	      if(loop == studentRollNo.length- 2)
	          System.out.println(studentRollNo[loop]);
	  }
	 }
}

24. How to validate if a particular value exists in array object in java ?

We can utilise the below array method to get the value from array object

Arrays.asList(<array object>).contains(<array element>);
package core.java.oracleappshelp.array;
import java.util.Arrays;
public class IsArrayValueExists {
	public static void main(String args[]) {
        String[]  studentNames = {"Roit", "Mohit", "Vinay", "Mohit", "Akshay" };
        System.out.println(isStudentExist(studentNames,"Mohit")); // true
        System.out.println(isStudentExist(studentNames,"Ajay")); // false
    }
    public static boolean isStudentExist(final String[] studentNames, final String value) {
        return Arrays.asList(studentNames).contains(value);
    }
}

25. Which is legal array initialization – int[] studentId or int studentId[] ?

Both are legal array initialization in java  . Preferred one is int[] studentId


Top 30 Java Design Pattern Interview Questions & Answers

Java Design Patterns is the core for building any robust and scalable web based application developed using Java. Java Design Patterns are the set of standards defined as best practices in the software industry. Design Patterns provides the common solution for the repetitive problems occurring again and again and helps in defining the standard approach for consumption in your code development.

The below given are the most commonly asked Design Pattern Interview Questions and answers in Job Interviews and other competitive entrance exams.

1. What is Gang of Four ?

The Java Design Patterns were first published in 1994 by Erich Gamma, Richard Hel , John Vlissides and Ralph Johnson who were computer scientists and authors by profession also known as “Gang Of Four”. The book published was titled “Design Patterns Elements of Reusable Object-Oriented Software” which provided the details on the best practices and the worst usage of Design Patterns.

2. What are the different categories in Java Design Patterns ?

The Java Design Patterns are classified into below given categories based on the problem analysis

Java Design Pattern CategoryJava Design Pattern Names
Creational Java Design PatternsFactory Pattern
Abstract Factory Pattern
Build Patterns
Prototype Pattern
Singleton Pattern
Structural Java Design Patterns Adapter Pattern
Bridge Pattern
Composite Pattern
Decorator Pattern
Proxy Pattern
Facade Pattern
Flyweight Pattern
Filter Pattern
Behavioral Java Design Patterns Interpreter Pattern
Template Pattern
Chain of Responsibility Pattern
Command Pattern
Iterator Pattern
Strategy Pattern
Visitor Pattern
J2EE Java Design Patterns MVC Pattern
Data Access Object Pattern
Transfer Object Pattern
Intercepting Filter Pattern
Front Controller Pattern

3. What are the benefits of using Java Design Patterns ?

As Java Design Patterns provides the set standards or practices for the common problems , it provides the below advantages when used in any application development

  • Design Patterns provides the industry standard approach for the recurring problems experienced by developers using object oriented programming.
  • Design Patterns are reusable and reduces total cost of ownership (TCO)
  • Usage of Design Patterns reduces the code development , make code easy to understand and debug for issues.
  • Design Patterns usage makes applications scalable and robust.

4. Provide examples of design patterns getting used in JDK library ?

The below given are few of the examples

Design PatternUsage in JDK Library
Singleton Patternused in the Calendar Classes
Observer Pattern used for handling events in AWT, Swing
Factory Patternused by wrapper classes for converting Integer, String values
Decorator Patternused by wrapper classes

5. What are creational design patterns ?

The creational design patterns provides the mechanism of creating objects by instantiating the class object directly using the new keyword. It provides the abstraction on the object creation process.

Employee emp = new Employee();

The new Keyword creates the instance for the class Employee.

6. What is a singleton design pattern ?

The concrete class can have multiple instance as per the object invocation from other concrete classes but when we need to strict the class with only one instance to be existed in the Virtual Java Machine, then such class need to be created as singleton class.

Singleton Design Pattern restricts and ensure that class only 1 instance should exist for the class. The class using singleton pattern creates an object and ensure only single instance is returned.

Examples:

  • Database class can be considered as singleton class implementing the singleton design pattern.
  • Java JDK implements singleton design pattern for calendar class.

Singleton Pattern can be created in 2 ways:

  • Early Instantiation: which means the creation of singleton instance at the startup / load time
  • Lazy Instantiation : which means the creation of singleton instance at the run-time.

7. What is the difference between a static class and a singleton class ?

The below are the primary differences between a static and singleton class

Static ClassSingleton class
Static class members are all staticSingleton class is not bounded only with static members.
Static class are loaded at startupsingleton class can be loaded at startup or lazy loaded ( at run-time)
Static class cannot be the top level class and cannot implement interfaces A singleton class can be a top level class and can also implement interfaces
Static class is stored as stack in memory spacesingleton class is stored as Heap in memory space

8. Can a singleton class be cloned ?

Yes, singleton class can be cloned. However to prevent singleton class from cloning, we can throw exception within the body of the clone( ) method.

9. What is a Factory Pattern?

  • The Factory Pattern is one of the most popular and commonly used Creational Design Pattern.
  • Factory Pattern is used in JDK library, Spring and Struts frameworks.
  • The factory pattern ensures the class instantiation from the client program to the factory class.
  • The factory pattern is useful when the super class have multiple sub-classes and based on the object instantiation one of the sub-class to be returned.
  • Factory Pattern is also known as Virtual Constructor.

10. What is a Abstract Factory Pattern ?

  • Abstract Factory Pattern is part of the Creational Design Patterns and helps in creating objects.
  • Abstract Factory Pattern is similar to the Factory Pattern but it is considered as factory of factories.
  • Abstract Factory Pattern defines the abstract class for creating the objects of related objects and provides the abstraction about the concrete sub-classes.
  • Abstract Factory Pattern is one level up from factory pattern

11. What is a Builder Pattern ?

Builder Design Pattern provides the way for handling more number of fields including optional fields and their inconsistent state by providing the mechanism to manage and return the final object.

Let’s consider that you have employee data where each field need to set . Like Employee firstName, lastName, emailAddress, contact, residential address, etc; In the normal java practice, we set each field separately but with the usage of Builder Pattern we can combine the values and pass it as a common method to set those values.

12. What is a Prototype Pattern ?

  • Prototype Design Pattern provides the mechanism to copy the original object to a new object for modifications.
  • Prototype pattern internally uses java cloning for copying the object.
  • Prototype pattern are quite useful when object creation is costly.
  • Example: Database operations uses Prototype pattern where the cloned object is cached , allowed for modifications and update the database which overall reduces the database calls.

13. What is an Adapter Pattern?

  • The adapter design pattern is one of the structural design patterns.
  • The adapter design pattern provides the mechanism to combine the functionalities of multiple incompatible class to generate a reusable class.
  • The adapter design pattern acts as the wrapper.
  • Example: Mobile Memory Card is an external device but gets connected to the Mobile and allows you to extend the overall mobile memory by getting connected through the mobile memory reader.

14. What is a Bridge Pattern?

  • The bridge design pattern is one of the structural design patterns.
  • The bridge design pattern provides the mechanism to decouple the interface(s) from the implementation by hiding implementation details (abstraction) from the client calls.
  • The bridge design pattern ensure that the concrete classes are independent from interface implementation classes

15. What is a Facade Design Pattern ?

  • The facade design pattern is one of the structural design patterns.
  • The earlier implementations had the tight binding between client and database operations or other system calls. Facade design patterns provides the mechanism to hide the complexities between the system calls and provides interface to the client to access the required implementations.
  • Example: The methods exposed by facade patterns can be consumed by the client program and hides the implementation of the database operations

16. What is a Composite Design Pattern ?

  • The composite design pattern is one of the structural design patterns.
  • The composite design pattern provides the mechanism to combine the group of objects as a single object providing the common structure for all objects.
  • The composite design pattern contains group of objects and allows modifications on those objects.

17. What is a Flyweight Design Pattern ?

  • The flyweight design pattern is one of the structural design patterns.
  • The flyweight design pattern provides the mechanism for reducing the number of objects created for the class by sharing the existing objects.
  • In case of no existing object found, flyweight pattern then creates the new object.
  • The flyweight design pattern avoid high memory consumption and helps in enhancing performance.

18. What is a Decorator Design Pattern ?

  • The decorator design pattern is one of the structural design patterns.
  • The decorator design pattern allows to modify the functionality for an object at run-time without impacting its existing structure.
  • Example: You have the class Pizza which provides Pizza Type ( Thin Crust, Thick Crust). You have another class as PizzaToppings which includes ( ‘Tomato, Onions, Olives, Peanuts, Extra Cheese,,etc) The decorator class can combine the Pizza and PizzaToppings and returns the output.
  • Example: BufferedReader and BufferedWriter classes in java

19. What is a Proxy Design Pattern ?

  • The proxy design pattern is one of the structural design patterns.
  • The proxy design pattern provides the mechanism to control the access of implementation class by extending a new class for handling the operations. If the received request is validated, then proxy pattern invokes the original class to provide the functionality.
  • The proxy design pattern helps in hiding the details of actual implementation class to the outside world.
  • Example: SOA Architecture provides the OSB Proxy which receives the request and then invokes the original web service for the functionality.

20. What is a Chain Of Responsibility Design Pattern ?

  • The chain of responsibility design pattern is one of the behavioral design patterns.
  • The chain of responsibility design pattern provides the mechanism where the request from the client program is passed to the Chain of Objects for processing the request. The chain object validates the received request, assigns the request to the object for execution.
  • The chain of responsibility design pattern adds the decoupling between the sender and receiver of the request as per request type.

21. What is a Command Design Pattern ?

  • The command design pattern is one of the behavioral design patterns.
  • The command design pattern is a data driven design pattern in the request-response model.
  • Provides the mechanism where the request is sent to the invoker, invoker passes the request to the command object (encapsulated), the command object passes the request to the appropriate receiver for processing.
  • Example: The command object can provide implementation for the Open File , Save File , Delete File, etc by providing the File command Pattern for receiving the client program request for each of these operations.

22. What is an Interpreter Design Pattern ?

  • The interpreter design pattern is one of the behavioral design patterns.
  • The interpreter design pattern provides the interpreter to define the grammatical representation of the language.
  • Example: Java JVM which interprets the java source code and converts it into byte code.

23. What is an Iterator Design Pattern ?

  • The iterator design pattern is one of the behavioral design patterns.
  • The iterator design pattern provides the mechanism to traverse the elements of collection object in the sequential order.
  • Example: Java Collection Framework uses Iterator Pattern.

24. What is a Visitor Design Pattern ?

  • The visitor design pattern is one of the behavioral design patterns.
  • The visitor design pattern provides the mechanism to perform operations on the similar objects.
  • The visitor class changes the calculation algorithm on the element class
  • Example: User logged in to an electronics online shopping and adds Laptop , mobile charger, mouse. When check out is clicked, it returns the listing of items with the total price and discounts applied which is applied on top of the available items in the cart.

25. What is a Strategy Design Pattern ?

  • The strategy design pattern is one of the behavioral design patterns.
  • The strategy design pattern provides the mechanism to have multiple algorithm for a specific task and client program decides which algorithm to be invoked at run-time.

26. What is an Observer Design Pattern ?

  • The observer design pattern is one of the behavioral design patterns.
  • The observer design pattern provides the mechanism where the object state change is notified.
  • The object that watch on the state of another object are called Observer
  • The object that is being watched is called Subject
  • Example: Event handling in java for AWT , Swing, Java Message Services

27. What is MVC Design Pattern ?

  • MVC is the one of the most common design pattern used in building java based web applications.
  • MVC stands for Model-View-Controller Pattern
  • Model : model represents the Java POJO or an java object carrying application data
  • View: View represents the Front End representation of the data that is returned by model
  • Controller: handles the request and response for each user action. It controls the data flow into model object and returns the updates model to the view.

28. What is a Template Design Pattern ?

  • The template design pattern is one of the behavioral design patterns.
  • The template design pattern provides the mechanism where an abstract class provides the template for invoking methods.
  • The template methods could provide the default implementation which is common for all sub-classes or specific method invocation to the sub-classes

29. What is State Design Pattern ?

  • The state design pattern is one of the behavioral design patterns.
  • The state design pattern provides the mechanism where the class bhavior changes on the change of the state

30. what is Business Delegate Design Pattern ?

  • The business delegate design patterns decouples the presentation layer and business layer where
  • Client: manages the presentation or view layer using JSP, JSF, servlets
  • Business Delegation: provides entry point to the client program to access business service methods
  • Lookup Service: Lookup Service object provides the reference of the business object required for implementation as per client request received.
  • Business Service: is an interfaace for the Concrete classes to provide actual business implementation logic