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
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"/>

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