JavaBeat FAQs
Sponsors
JAVABEAT
Home
Articles
Tips
QnA
Forums
FAQs Topics Books Topic
Java Java Books
Struts Struts Books
Spring Spring Books
Hibernate Hibernate Books
JBoss Seam Seam Books
J2EE J2EE Books
EJB EJB Books
JSF JSF Books
Servlets Servlets Books
JDBC JDBC Books
RMI RMI Books
JMS JMS Books
JNI JNI Books
Design Patterns Patterns Books
Exception Exception Books
Apache Ant Ant Books
Groovy
Cobertura
Quartz

Java Messaging Service(JMS) Interview Questions

JMS FAQs - 1 | JMS FAQs - 2

JMS Interview Questions - Part1

  1. What is JMS?

Java Message Service is the new standard for interclient communication. It allows J2EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.


  1. What type messaging is provided by JMS

Both synchronous and asynchronous


  1. How may messaging models do JMS provide for and what are they?

JMS provides for two messaging models, publish-and-subscribe and point-to-point queuing

 

  1. What are the types of messaging? 
        There are two kinds of Messaging. Synchronous messaging involves a client that waits for the server to respond to a message.    
        Asynchronous messaging involves a client that does not wait for a message from the server. An event is used to trigger a message from a
        server.

  1. What is publish/subscribe messaging?
        With publish/subscribe message passing the sending application/client establishes a named topic in the JMS broker/server and publishes
        messages to this queue. The receiving clients register (specifically, subscribe) via the broker to messages by topic; every subscriber to a
        topic receives each message published to that topic. There is a one-to-many relationship between the publishing client and the subscribing
        clients.

  1. Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of delivery?
        Some messaging systems provide synchronous delivery to destinations as a mechanism for implementing reliable applications. Some systems
        provide clients with various forms of delivery notification so that the clients can detect dropped or ignored messages. This is not the model
        defined by the JMS API. JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics of PERSISTENT
        messages. In addition, message consumers can insure reliable processing of messages by using either CLIENT_ACKNOWLEDGE mode or
        transacted sessions. This achieves reliable delivery with minimum synchronization and is the enterprise messaging model most vendors and          developers prefer. The JMS API does not define a schema of systems messages (such as delivery notifications). If an application requires
        acknowledgment of message receipt, it can define an application-level acknowledgment message.

  1. What are the core JMS-related objects required for each JMS-enabled application?
        Each JMS-enabled client must establish the following:
    • A connection object provided by the JMS server (the message broker)
    • Within a connection, one or more sessions, which provide a context for message sending and receiving
    • Within a session, either a queue or topic object representing the destination (the message staging area) within the message broker
    • Within a session, the appropriate sender or publisher or receiver or subscriber object (depending on whether the client is a message producer or consumer and uses a point-to-point or publish/subscribe strategy, respectively). Within a session, a message object (to send or to receive)

  1. What is the Role of the JMS Provider?
        The JMS provider handles security of the messages, data conversion and the client triggering. The JMS provider specifies the level of
        encryption and the security level of the message, the best data type for the non-JMS client.

  1. How does a typical client perform the communication? -

1.      Use JNDI to locate administrative objects.

                        2.   Locate a single ConnectionFactory object.

3.      Locate one or more Destination objects.

4.      Use the ConnectionFactory to create a JMS Connection.

5.      Use the Connection to create one or more Session(s).

6.      Use a Session and the Destinations to create the MessageProducers and MessageConsumers needed.

7.      Perform your communication.


  1. Give an example of using the point-to-point model.
        The point-to-point model is used when the information is specific to a single client. For example, a client can send a message for a print
        out, and the server can send information back to this client after completion of the print job.


 

Bookmark This Page : | | | | | | | | | | |
Related Articles
Liferay Portal Enterprise Intranets
ZK Developer’s Guide : Online Media Library
The BIRT Environment and Your First Report
AJAX - The Complete Reference
The Java 6.0 Compiler API
Spring Web Flow - Introduction
Introduction to Spring Web Framework
Integrating Struts With Spring
What's new in Struts 2.0? - Struts 2.0 Framework
Introductiion to Jakarta Struts
more articles
java6 ejb3 jsf hibernate eclipse ajax groovy spring seam java struts webservice j2me guice java5 jca tapestry soa linux ria

Sponsors
Webmaster Hosting Forum
Java Jobs
Latest in DLinks
http://javawave.blogspot.com/2008/04/quartz-job-scheduler-part-ii-example.html
Quartz Job Scheduler -- Part 1 (Setting up development project in Netbeans 6.1 beta)
Flex Messaging with BEA Workshop Studio
SOA and Virtualization: How do They Fit Together?
Introduction to Enterprise Portals - Why they Benefit IT and the Business
BEA WebLogic Operations Control: Application Virtualization for Enterprise Java
Best Practices for Building Production Quality EAR Files
BEA's SOA Reference Architecture - A Foundation for Business Agility
Blueprint for Successful SOA Integration
Guardian - What a tool!

JavaBeat Media (2004-2008), India
javabeat home | About Us
our network : opensource softwares
Copyright © 2007 JavaBeat