• No results found

jms interview questions

N/A
N/A
Protected

Academic year: 2021

Share "jms interview questions"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

This Download is from www.downloadmela.com . The

This Download is from www.downloadmela.com . The main motto of this website is to provide freemain motto of this website is to provide free download links of 

download links of 

ebooks,video tutorials,magazines,previous papers,interview related content. To download more visit ebooks,video tutorials,magazines,previous papers,interview related content. To download more visit the website.

the website.

If you like our services please help us in

If you like our services please help us in 2 ways.2 ways. 1.Donate money.

1.Donate money.

Please go through the link to do Please go through the link to donatenate

http://www.downloadmela.com/donate.html http://www.downloadmela.com/donate.html 2.Tell about this website to your friends,relatives. 2.Tell about this website to your friends,relatives.

Thanks for downloading. Enjoy the reading. Thanks for downloading. Enjoy the reading.

What is JMS? What is JMS?

A1: A1:

Java Message Service: An interface implemented by most J2EE containers to provide point-to-point Java Message Service: An interface implemented by most J2EE containers to provide point-to-point queueing and topic (publish/subscribe) behavior. JMS is frequently used by

queueing and topic (publish/subscribe) behavior. JMS is frequently used by EJB's that need to startEJB's that need to start another process asynchronously.

another process asynchronously.

For example, instead of sending an email directly from an Enterprise JavaBean, the bean may choose to For example, instead of sending an email directly from an Enterprise JavaBean, the bean may choose to  put the message onto a

 put the message onto a JMS queue to be handled JMS queue to be handled by a Message-Driven Bean (another type of EJB) or by a Message-Driven Bean (another type of EJB) or  another system in the enterprise. This technique allows the EJB to

another system in the enterprise. This technique allows the EJB to return to handling requestsreturn to handling requests immediately instead of waiting for a potentially lengthy process to complete.

immediately instead of waiting for a potentially lengthy process to complete. A2:

A2:

The Java Message Service (JMS) defines the standard for reliable Enterprise Messaging. Enterprise The Java Message Service (JMS) defines the standard for reliable Enterprise Messaging. Enterprise messaging, often also referred to as Messaging Oriented Middleware (MOM), is universally recognized messaging, often also referred to as Messaging Oriented Middleware (MOM), is universally recognized as an essential tool for building enterprise applications. By combining

as an essential tool for building enterprise applications. By combining Java technology with enterpriseJava technology with enterprise messaging, the JMS API provides a powerful tool for solving enterprise computing problems.

messaging, the JMS API provides a powerful tool for solving enterprise computing problems. A3:

A3:

JMS stands for Java Messaging Service which is developed b

JMS stands for Java Messaging Service which is developed b y Sun Microsystems . JMS Provider allowy Sun Microsystems . JMS Provider allow applications which are running on different systems can communicate with each other asynchronously . applications which are running on different systems can communicate with each other asynchronously . Many EAI tools support JMS as their standard messaging service.

Many EAI tools support JMS as their standard messaging service. A4:

A4:

The Java Message Service is a Java

(2)

messages. Designed by Sun and several partner companies, the JMS API defines a common set of  messages. Designed by Sun and several partner companies, the JMS API defines a common set of  interfaces and associated semantics that allow programs written in the Java programming language to interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.

communicate with other messaging implementations. A5;

A5;

JMS stands for Java Message Service. It allows applications to communicate through

JMS stands for Java Message Service. It allows applications to communicate through reliable,reliable, scaleable, and asynchronous text messages and objects over the network.

scaleable, and asynchronous text messages and objects over the network. A6;

A6;

Java Message Service (JMS) is the new standard for interclient communication. It allows J2EE Java Message Service (JMS) is the new standard for interclient communication. It allows J2EE application components to create, send,

application components to create, send, receive, and read messages. It enareceive, and read messages. It enables distributedbles distributed communication that is loosely coupled, reliable, and asynchronous.

communication that is loosely coupled, reliable, and asynchronous. A7;

A7;

JMS is an acronym used for Java Messaging Service. It is Java's answer to creating software using JMS is an acronym used for Java Messaging Service. It is Java's answer to creating software using asynchronous messaging. It is one of the official specifications of the J2EE

asynchronous messaging. It is one of the official specifications of the J2EE technologies and is a keytechnologies and is a key technology.

technology.

Must I place all my class files in the WEB-INF folder and all JSP's outside? Must I place all my class files in the WEB-INF folder and all JSP's outside?

A1: A1:

The class files should place into WEB-INF/classes folder and the JSP files should place within a The class files should place into WEB-INF/classes folder and the JSP files should place within a separate folder.

separate folder. A2:

A2:

Yes! Otherwise the web server/ application server cannot access the .jsp files and classes. Yes! Otherwise the web server/ application server cannot access the .jsp files and classes. The java class files can be

The java class files can be placed either in WEB-INF/lib or WEB-INF/classes. But it is recommendedplaced either in WEB-INF/lib or WEB-INF/classes. But it is recommended to put the class files in WEB-INF/classes. The server will load the files from the classpath so

to put the class files in WEB-INF/classes. The server will load the files from the classpath so it just willit just will not matter where the class is.

not matter where the class is. A3:

A3:

Yes, class files is private

Yes, class files is private resources, so you must store resources, so you must store class in WEB-INF/classes folder.class in WEB-INF/classes folder. JSP and HTML files should be placed outside.

JSP and HTML files should be placed outside. A4:

A4:

Class files inside web-inf cannot be access by browsers, while the JSP files are meant for accessible by Class files inside web-inf cannot be access by browsers, while the JSP files are meant for accessible by  browsers so, it may be strictly place outside the web-inf only.

 browsers so, it may be strictly place outside the web-inf only. A5:

A5:

Here is structure of web app. Here is structure of web app.

web (this folder is Accessible from www) web (this folder is Accessible from www) Store all your JSP and HTML files here Store all your JSP and HTML files here WEB-INF (this folder is not Accessible ) WEB-INF (this folder is not Accessible )

classes (store your classes here, classes you are using in jsp classes (store your classes here, classes you are using in jsp lib (store 3rd party jars)

lib (store 3rd party jars)

A6: A6:

(3)

1. Class files - Either they must be in WEB-INF\classes directory OR you can package

1. Class files - Either they must be in WEB-INF\classes directory OR you can package them as JAR them as JAR  and put in

and put in WEB-INF\libWEB-INF\lib

2. JSP files - Depends how do you d

2. JSP files - Depends how do you design your arch. If you have controller/delegator that can esign your arch. If you have controller/delegator that can forwardforward requests to JSPs, you can keep them under

requests to JSPs, you can keep them under WEB-INF directory also. If not, you have to keep WEB-INF directory also. If not, you have to keep themthem outside WEB-INF.

outside WEB-INF. A7:

A7:

The Java Message Service (JMS) API is a messaging standard that allows application

The Java Message Service (JMS) API is a messaging standard that allows application componentscomponents  based on the Java

 based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. Itread messages. It enables distributed communication that is loosely coupled, reliable, and

enables distributed communication that is loosely coupled, reliable, and asynchronousasynchronous

What type messaging is provided by JMS? What type messaging is provided by JMS?

Both synchronous and asynchronous. Both synchronous and asynchronous.

How may messaging models do JMS provide for and what are they? 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. JMS provides for two messaging models, publish-and-subscribe and point-to-point queuing.

What is the point-to-point model in JMS? What is the point-to-point model in JMS?

A point-to-point model is based on the

A point-to-point model is based on the concept of a message queconcept of a message queue: Senders send messages into theue: Senders send messages into the queue, and the receiver

queue, and the receiver reads messages from this queue. In the point-to-point model, reads messages from this queue. In the point-to-point model, several receiversseveral receivers can exist, attached to the same

can exist, attached to the same queue. However, (Message Oriented Middleware)MOM will deliver thequeue. However, (Message Oriented Middleware)MOM will deliver the message only to one of them. To

message only to one of them. To which depends on the MOM which depends on the MOM implementation.implementation.

What are the advantages of JMS? What are the advantages of JMS?

One of the principal advantages

One of the principal advantages of JMS messaging is that it's asynchronous. Thus not all the piecesof JMS messaging is that it's asynchronous. Thus not all the pieces need to be up

need to be up all the time for the application to function all the time for the application to function as a whole.as a whole.

What is the publish-and-subscribe model in JMS? What is the publish-and-subscribe model in JMS?

A publish-subscribe model is based on the

A publish-subscribe model is based on the message topic concept: Publishers send messages in a topic,message topic concept: Publishers send messages in a topic, and all subscribers of the given topic receive these messages.

and all subscribers of the given topic receive these messages.

What is JMS administered object? What is JMS administered object?

A preconfigured JMS object (a resource manager

A preconfigured JMS object (a resource manager connection factory or a destination) created by anconnection factory or a destination) created by an administrator for the use of JMS clients and placed in a JNDI namespace

administrator for the use of JMS clients and placed in a JNDI namespace

What is publish/subscribe messaging? What is publish/subscribe messaging?

With publish/subscribe message passing the sending application/client establishes a named topic

With publish/subscribe message passing the sending application/client establishes a named topic in thein the JMS broker/server and publishes messages to this queue. The

JMS broker/server and publishes messages to this queue. The receiving clients register (specifically,receiving clients register (specifically, subscribe) via the broker to messages by topic; every

subscribe) via the broker to messages by topic; every subscriber to a topic receives each messagesubscriber to a topic receives each message  published to that topic. There is a

 published to that topic. There is a one-to-many relationship between the publishing client and theone-to-many relationship between the publishing client and the subscribing clients.

subscribing clients.

What is the main parts of JMS applications? What is the main parts of JMS applications?

The main parts of JMS applications are: The main parts of JMS applications are: --ConnectionFactory and Destination --ConnectionFactory and Destination --Connection --Connection --Session --Session --MessageProducer  --MessageProducer  --MessageConsumer  --MessageConsumer  --Message --Message

(4)

What Is Messaging? What Is Messaging?

Messaging is a method of communication between

Messaging is a method of communication between software components or applications. A messagingsoftware components or applications. A messaging system is a peer-to-peer facility: A messaging client can send messages to, and

system is a peer-to-peer facility: A messaging client can send messages to, and receive messages from,receive messages from, any other client. Each client connects

any other client. Each client connects to a messaging agent that provides to a messaging agent that provides facilities for creating, sending,facilities for creating, sending, receiving, and reading messages.

receiving, and reading messages.

Messaging enables distributed communication that is loosely coupled. A

Messaging enables distributed communication that is loosely coupled. A component sends a message tocomponent sends a message to a destination, and the recipient can

a destination, and the recipient can retrieve the message from the destination. However, the retrieve the message from the destination. However, the sender andsender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender  the receiver do not have to be available at the same time in order to communicate. In fact, the sender  does not need to know anything about the receiver; nor does the receiver need to know anything about does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and

the sender. The sender and the receiver need to know the receiver need to know only what message format and what destinationonly what message format and what destination to use. In this respect, messaging differs from tightly coupled technologies, such

to use. In this respect, messaging differs from tightly coupled technologies, such as Remote Methodas Remote Method Invocation (RMI), which require an application to know a remote application's methods.

Invocation (RMI), which require an application to know a remote application's methods. Messaging also differs from electronic mail (e-mail), which is a method of communication

Messaging also differs from electronic mail (e-mail), which is a method of communication betweenbetween  people or between software applications and

 people or between software applications and people. Messaging is used for communication people. Messaging is used for communication betweenbetween software applications or software components.

software applications or software components. Messaging is a mechanism by which data ca

Messaging is a mechanism by which data can be passed from one n be passed from one application to another application.application to another application.

What is the Role of the JMS Provider? What is the Role of the JMS Provider?

The JMS provider handles security of the messages, data c

The JMS provider handles security of the messages, data c onversion and the client triggering. The onversion and the client triggering. The JMSJMS  provider specifies the level of encryption and the security level of the message, the best data type for   provider specifies the level of encryption and the security level of the message, the best data type for 

the non-JMS client. the non-JMS client.

What is the diffrence between Java Mail and JMS Queue What is the diffrence between Java Mail and JMS Queue

JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full  programmatic control over quality of service and delivery options.

 programmatic control over quality of service and delivery options.

JavaMail provides lowest common denominator, slow, but human-readable

JavaMail provides lowest common denominator, slow, but human-readable messaging usingmessaging using infrastructure already available on virtually ev

infrastructure already available on virtually every computing platform.ery computing platform.

Does JMS specification define transactions? Queue Does JMS specification define transactions? Queue

JMS specification defines a transaction mechanisms allowing clients to send and receive groups of  JMS specification defines a transaction mechanisms allowing clients to send and receive groups of  logically bounded messages as a single unit of

logically bounded messages as a single unit of information. A Session may be marked as transacted. Itinformation. A Session may be marked as transacted. It means that all messages sent in a session are

means that all messages sent in a session are considered as parts of a transaction. A set considered as parts of a transaction. A set of messages canof messages can  be committed (commit() method) or rolled back (rollback() method). If a

 be committed (commit() method) or rolled back (rollback() method). If a provider supports distributedprovider supports distributed transactions, it's recommended to use XAResource API.

transactions, it's recommended to use XAResource API.

What is synchronous messaging? Queue What is synchronous messaging? Queue

Synchronous messaging involves a client that waits for the server to

Synchronous messaging involves a client that waits for the server to respond to a message. So if onerespond to a message. So if one end is down the entire communication will fail.

end is down the entire communication will fail.

What is asynchronous messaging? Queue What is asynchronous messaging? Queue

Asynchronous messaging involves a client that does not wait for a message from the server. An event is 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. So

used to trigger a message from a server. So even if the client is down even if the client is down , the messaging will complete, the messaging will complete successfully.

successfully.

How does a typical client perform the communication? Queue How does a typical client perform the communication? Queue

1. Use JNDI to locate administrative objects. 1. Use JNDI to locate administrative objects. 2. Locate a single Connec

2. Locate a single ConnectionFactory object.tionFactory object. 3. Locate one or more Destination objects. 3. Locate one or more Destination objects. 4. Use the ConnectionFactory to create a

(5)

5. Use the Connection to

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

6. Use a Session and the Destinations to create the MessageProducers and MessageConsumers needed.Destinations to create the MessageProducers and MessageConsumers needed. 7. Perform your communication.

7. Perform your communication.

What is JMS session? Queue What is JMS session? Queue

A single-threaded context for sending and

A single-threaded context for sending and receiving JMS messages. A JMS session can bereceiving JMS messages. A JMS session can be nontransacted, locally transacted, or participating in a distributed transaction.

nontransacted, locally transacted, or participating in a distributed transaction.

What is the use of JMS? In which situations we are using JMS? Can we send message from one What is the use of JMS? In which situations we are using JMS? Can we send message from one server to another server using JMS? Queue

server to another server using JMS? Queue

JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full  programmatic control over quality of service and delivery options.

 programmatic control over quality of service and delivery options.

What is the difference between durable and non-durable subscriptions? What is the difference between durable and non-durable subscriptions?

Point-To-Point (PTP). This model allows exchanging messages via queues created for some

Point-To-Point (PTP). This model allows exchanging messages via queues created for some purposes.purposes. A client can send and

A client can send and receive messages from one or several queues. receive messages from one or several queues. PTP model is easier than pub/subPTP model is easier than pub/sub model.

model.

A durable subscription gives a subscriber the freedom o

A durable subscription gives a subscriber the freedom o f receiving all messages from a topic, whereas af receiving all messages from a topic, whereas a non-durable subscription doesn't make any guarantees abo

non-durable subscription doesn't make any guarantees abo ut messages sent by others when a client ut messages sent by others when a client waswas disconnected from a topic.

disconnected from a topic.

What is the difference between Message producer and Message consumer? What is the difference between Message producer and Message consumer?

A1: A1:

Messaging systems provide a host of powerful advantages over other conventional distributed Messaging systems provide a host of powerful advantages over other conventional distributed computing models. Primarily, they encourage "loose coupling" between message consumers and computing models. Primarily, they encourage "loose coupling" between message consumers and message producers. There is a high

message producers. There is a high degree of anonymity between producer and degree of anonymity between producer and consumer: to theconsumer: to the message consumer, it doesn't matter who produced the message, where the producer lives on the message consumer, it doesn't matter who produced the message, where the producer lives on the network, or when the message was produced.

network, or when the message was produced. A2:

A2:

In Publish/Subscribe model: In Publish/Subscribe model:

A publish/subscribe (pub/sub) messaging system supports an event driven model where information A publish/subscribe (pub/sub) messaging system supports an event driven model where information consumers and producers participate in the transmission of messages. Producers "publish" events, consumers and producers participate in the transmission of messages. Producers "publish" events, while consumers "subscribe" to events of interest, and co

while consumers "subscribe" to events of interest, and co nsume the events. Producers associatensume the events. Producers associate messages with a specific topic, and the

messages with a specific topic, and the messaging system routes messages to consumers based on themessaging system routes messages to consumers based on the topics the consumers register interest in.

topics the consumers register interest in. In Point-To-Point model:

In Point-To-Point model:

In point to point messaging systems, messages are routed to an

In point to point messaging systems, messages are routed to an individual consumer which maintains aindividual consumer which maintains a queue of "incoming" messages. Messaging applications send

queue of "incoming" messages. Messaging applications send messages to a specified queue, anmessages to a specified queue, and clientsd clients retrieve messages from a queue.

retrieve messages from a queue. A3:

A3:

In Point-To-Point model, one client can send message

In Point-To-Point model, one client can send message to the another client through the to the another client through the Destination.Destination. There is a guarantee to recieve the message whenever reciever is connected.

There is a guarantee to recieve the message whenever reciever is connected.

example:your telephone answering machine ,outer send a message to u,but you can recieve those msg example:your telephone answering machine ,outer send a message to u,but you can recieve those msg whenever u coonected to answering machine.

whenever u coonected to answering machine. In pub/sub model. one pub

In pub/sub model. one publisher,many no.of clients willbe there,publisher publish thelisher,many no.of clients willbe there,publisher publish the message,subscriber or consumer can recieve those messages wh

(6)

topic.There is no guarantee consumer ca

topic.There is no guarantee consumer can recieve the messages send n recieve the messages send by the publisher.by the publisher.

What is JMS application ? What is JMS application ?

One or more JMS clients that exchange

One or more JMS clients that exchange messages.messages.

What type messaging is provided by JMS ? What type messaging is provided by JMS ?

Both synchronous and asynchronous are provided by JMS. Both synchronous and asynchronous are provided by JMS.

How JMS is different from RPC? How JMS is different from RPC?

In RPC the method invoker waits for the

In RPC the method invoker waits for the method to finish execution and method to finish execution and return the control back to thereturn the control back to the invoker. Thus it is completely synchronous in nature. While in JMS the

invoker. Thus it is completely synchronous in nature. While in JMS the message sender just sends themessage sender just sends the message to the destination and continues

message to the destination and continues it's own processing. The sender does not it's own processing. The sender does not wait for the receiver wait for the receiver  to respond. This is asynchronous behavior.

to respond. This is asynchronous behavior.

What Is the JMS API? What Is the JMS API?

The Java Message Service is a Java

The Java Message Service is a Java API that allows applications to create, send, receive, anAPI that allows applications to create, send, receive, an d readd read messages. Designed by Sun and several partner companies, the JMS API defines a common set of  messages. Designed by Sun and several partner companies, the JMS API defines a common set of  interfaces and associated semantics that allow programs written in the Java programming language to interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.

communicate with other messaging implementations.

The JMS API minimizes the set of concepts a programmer must learn to use messaging products but The JMS API minimizes the set of concepts a programmer must learn to use messaging products but  provides enough features to support sophisticated messaging applications. It also

 provides enough features to support sophisticated messaging applications. It also strives to maximizestrives to maximize the portability of JMS applications across JMS providers in the same messaging domain.

the portability of JMS applications across JMS providers in the same messaging domain. The JMS API enables communication that is not only loosely coupled

The JMS API enables communication that is not only loosely coupled but alsobut also * Asynchronous. A JMS provider can deliver messages to

* Asynchronous. A JMS provider can deliver messages to a client as they arrive; a client doea client as they arrive; a client does not haves not have to request messages in order to receive them.

to request messages in order to receive them. * Reliable. The JMS API can ensure that

* Reliable. The JMS API can ensure that a message is delivered once a message is delivered once and only once. Lower levels of and only once. Lower levels of  reliability are available for applications that can afford to miss messages or to receive

reliability are available for applications that can afford to miss messages or to receive duplicateduplicate messages.

messages.

The JMS Specification was first published in August 1998. The latest version of the JMS Specification The JMS Specification was first published in August 1998. The latest version of the JMS Specification is Version 1.1, which was released in

is Version 1.1, which was released in April 2002. You can download April 2002. You can download a copy of the Specification froma copy of the Specification from the JMS Web site,

the JMS Web site, http://java.sun.com/products/jms/http://java.sun.com/products/jms/..

What is JMS client ? What is JMS client ?

A Java language program that

A Java language program that sends or receives messages.sends or receives messages.

Give an example of using the point-to-point model Give an example of using the point-to-point model

The point-to-point model is used when the

The point-to-point model is used when the information is specific to a single client. For example, ainformation is specific to a single client. For example, a client can send a message for

client can send a message for a print out, and the server a print out, and the server can send information back to this ccan send information back to this client after lient after  completion of the print job.

completion of the print job.

What is Producer and Consumer? What is Producer and Consumer?

A1: A1:

Messaging lets a servlet delegate processing to a

Messaging lets a servlet delegate processing to a batch process either on the same batch process either on the same machine or on amachine or on a separate machine. The servlet creates a message and sends it to a queue. The servlet immediately separate machine. The servlet creates a message and sends it to a queue. The servlet immediately completes and when the ba

completes and when the batch process is ready, it processes the message.tch process is ready, it processes the message. Messaging is therefore comprised of three main components:

Messaging is therefore comprised of three main components:

A Producer creates messages and sends them to a Queue. The Producer could be something like a A Producer creates messages and sends them to a Queue. The Producer could be something like a Servlet.

Servlet.

A Queue stores the messages from the Produces and

A Queue stores the messages from the Produces and provides them to a Consumer when provides them to a Consumer when ready. Theready. The Queue is implemented by the messaging provider.

(7)

A Consumer processes messages as they become available

A Consumer processes messages as they become available in the Queue. The in the Queue. The Consumer is typically aConsumer is typically a  bean implementing the MessageListener interface.

 bean implementing the MessageListener interface. A2:

A2:

A producer is the client application that

A producer is the client application that plays the role of a message sender in plays the role of a message sender in JMS API.JMS API. A consumer is the client application that p

A consumer is the client application that plays the role of a message receiver in lays the role of a message receiver in JMS API.JMS API.

Can JMS utilities automatically re-establish a connection if one side of the communication link  Can JMS utilities automatically re-establish a connection if one side of the communication link  (i.e. an application that's sending/receiving messages) goes down and is restarted? Are there APIs (i.e. an application that's sending/receiving messages) goes down and is restarted? Are there APIs to help detect that the other side broke a connection (went down)?

to help detect that the other side broke a connection (went down)?

Yes. You can write a snooper files to detect the service and restart the node upon node fail and a server  Yes. You can write a snooper files to detect the service and restart the node upon node fail and a server  instance fail.

instance fail.

What is the Role of the JMS Provider? What is the Role of the JMS Provider?

The JMS provider handles security of the messages, data c

The JMS provider handles security of the messages, data c onversion and the client triggering. The onversion and the client triggering. The JMSJMS  provider specifies the level of encryption and the security level of the message, the best data type for   provider specifies the level of encryption and the security level of the message, the best data type for 

the non-JMS client. the non-JMS client.

What is JMS provider? What is JMS provider?

A messaging system that implements the Java Message Service as well as

A messaging system that implements the Java Message Service as well as other administrative andother administrative and control functionality needed in a full-featured messaging product.

control functionality needed in a full-featured messaging product.

What is Byte Message ? What is Byte Message ?

Byte Messages contains a Stream of uninterrupted bytes. Byte Message contains an

Byte Messages contains a Stream of uninterrupted bytes. Byte Message contains an array of primitivearray of primitive  bytes in it's payload. Thus it can be

 bytes in it's payload. Thus it can be used for transfer of data between two aused for transfer of data between two applications in their nativepplications in their native format which may not be compatible with

format which may not be compatible with other Message types. It is also useful where JMS is usedother Message types. It is also useful where JMS is used  purely as a transport between two systems and the message

 purely as a transport between two systems and the message payload is opaque to the JMS client.payload is opaque to the JMS client.

What is the difference between Byte Message and Stream Message? What is the difference between Byte Message and Stream Message?

Bytes Message stores data in bytes. Thus the message is one

Bytes Message stores data in bytes. Thus the message is one contiguous stream of bytes. While thecontiguous stream of bytes. While the Stream Message maintains a boundary between the

Stream Message maintains a boundary between the different data types stored because it also stores thedifferent data types stored because it also stores the type information along with the value of the

type information along with the value of the primitive being stored. Bytes Message allows data to beprimitive being stored. Bytes Message allows data to be read using any type. Thus even if your payload contains a long value, you can invoke a method to read read using any type. Thus even if your payload contains a long value, you can invoke a method to read a short and it will return you something. It will not give

a short and it will return you something. It will not give you a semantically correct data but the call you a semantically correct data but the call willwill succeed in reading the first two bytes of data.

succeed in reading the first two bytes of data. This is strictly prohibited in the Stream Message. ItThis is strictly prohibited in the Stream Message. It maintains the type information of the data being

maintains the type information of the data being stored and enforces strict conversion rules on the datastored and enforces strict conversion rules on the data  being read.

 being read.

What are the advantages of JMS? What are the advantages of JMS?

JMS is asynchronous in nature. Thus not all the

JMS is asynchronous in nature. Thus not all the pieces need to be upieces need to be up all the time for the application top all the time for the application to function as a whole. Even

function as a whole. Even if the receiver is down the MOM will store the if the receiver is down the MOM will store the messages on it's behalf andmessages on it's behalf and will send them once it comes back

will send them once it comes back up. Thus at least a part up. Thus at least a part of application can still function as there is noof application can still function as there is no  blocking.

 blocking.

Are you aware of any major JMS products available in the market? Are you aware of any major JMS products available in the market?

IBM's MQ Series is one of the most popular product

IBM's MQ Series is one of the most popular product used as Message Oriented Middleware. Some of used as Message Oriented Middleware. Some of  the other products are SonicMQ, iBus etc. Weblogic

the other products are SonicMQ, iBus etc. Weblogic application server also comes with built in supportapplication server also comes with built in support for JMS messaging.

for JMS messaging.

What are the different types of messages available in the JMS API? What are the different types of messages available in the JMS API?

Message, TextMessage, BytesMessage, StreamMessage, ObjectMessage, MapMessage are the Message, TextMessage, BytesMessage, StreamMessage, ObjectMessage, MapMessage are the

(8)

different messages available in the JMS API. different messages available in the JMS API.

What are the different messaging paradigms JMS supports? What are the different messaging paradigms JMS supports?

Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p. Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p.

What is the difference between topic and queue? What is the difference between topic and queue?

A topic is typically used for one to many messaging

A topic is typically used for one to many messaging i.e. it supports publish subscribe model of i.e. it supports publish subscribe model of  messaging. While queue is used for one-to-one

messaging. While queue is used for one-to-one messaging i.e. it supports Point to Point Messaging.messaging i.e. it supports Point to Point Messaging.

How Does the JMS API Work with the J2EE Platform? How Does the JMS API Work with the J2EE Platform?

When the JMS API was introduced in 1998, its most important purpose was to allow Java applications When the JMS API was introduced in 1998, its most important purpose was to allow Java applications to access existing messaging-oriented middleware (MOM) systems, such as MQSeries from IBM. to access existing messaging-oriented middleware (MOM) systems, such as MQSeries from IBM. Since that time, many vendors have

Since that time, many vendors have adopted and implemented the JMS API, so that adopted and implemented the JMS API, so that a JMS product cana JMS product can now provide a complete messaging

now provide a complete messaging capability for an enterprise.capability for an enterprise. Since the 1.3 release of the

Since the 1.3 release of the J2EE platform ("the J2EE 1.3 platform"), the JMS API has been J2EE platform ("the J2EE 1.3 platform"), the JMS API has been an integralan integral  part of the platform, and application d

 part of the platform, and application developers can use messaging with components using evelopers can use messaging with components using J2EE APIsJ2EE APIs ("J2EE components").

("J2EE components").

The JMS API in the J2EE platform has the following features. The JMS API in the J2EE platform has the following features.

* Application clients, Enterprise JavaBeans (EJB) components, and Web components can send or  * Application clients, Enterprise JavaBeans (EJB) components, and Web components can send or  synchronously receive a JMS message. Application clients can in addition

synchronously receive a JMS message. Application clients can in addition receive JMS messagesreceive JMS messages asynchronously. (Applets, however, are not required to support the

asynchronously. (Applets, however, are not required to support the JMS API.)JMS API.)

* Message-driven beans, which are a kind of enterprise bean, enable the asynchronous consumption of  * Message-driven beans, which are a kind of enterprise bean, enable the asynchronous consumption of  messages. A JMS provider may optionally implement concurrent processing of messages by messages. A JMS provider may optionally implement concurrent processing of messages by message-driven beans.

driven beans.

* Message sends and receives can participate in distributed transactions. * Message sends and receives can participate in distributed transactions.

The JMS API enhances the J2EE platform by simplifying enterprise development, allowing loosely The JMS API enhances the J2EE platform by simplifying enterprise development, allowing loosely coupled, reliable, asynchronous interactions among J2EE components and legacy systems capable of  coupled, reliable, asynchronous interactions among J2EE components and legacy systems capable of  messaging. A developer can

messaging. A developer can easily add new behavior to a easily add new behavior to a J2EE application with existing businessJ2EE application with existing business events by adding a new message-driven bean to operate on specific business events. The J2EE events by adding a new message-driven bean to operate on specific business events. The J2EE  platform's EJB container architecture, moreover, enhances the JMS API by providing support for   platform's EJB container architecture, moreover, enhances the JMS API by providing support for 

distributed transactions and allowing for the concurrent consumption of

distributed transactions and allowing for the concurrent consumption of messages.messages. Another J2EE platform technology, the J2EE Connector

Another J2EE platform technology, the J2EE Connector Architecture, provides tight integrationArchitecture, provides tight integration  between J2EE applications and existing Enterprise Information (EIS) systems. The JMS API, on the  between J2EE applications and existing Enterprise Information (EIS) systems. The JMS API, on the

other hand, allows for a very loosely coupled

other hand, allows for a very loosely coupled interaction between J2EE applications and existing EISinteraction between J2EE applications and existing EIS systems.

systems.

At the 1.4 release of the

At the 1.4 release of the J2EE platform, the JMS provider may be integrated with the apJ2EE platform, the JMS provider may be integrated with the ap plication server plication server  using the J2EE Connector Architecture. You

using the J2EE Connector Architecture. You access the JMS provider through a resource adapter. access the JMS provider through a resource adapter. For For  more information, see the Enterprise JavaBeans Specification, v2.1, an

more information, see the Enterprise JavaBeans Specification, v2.1, an d the J2EE Connector d the J2EE Connector  Architecture Specification, v1.5.

Architecture Specification, v1.5.

What is the role of JMS in enterprise solution development? What is the role of JMS in enterprise solution development?

JMS is typically used in the following scenarios JMS is typically used in the following scenarios

1. Enterprise Application Integration: - Where a legacy application is integrated

1. Enterprise Application Integration: - Where a legacy application is integrated with a new applicationwith a new application via messaging.

via messaging.

2. B2B or Business to Business: - Businesses can interact with

2. B2B or Business to Business: - Businesses can interact with each other via messaging because each other via messaging because JMSJMS allows organizations to cooperate without tightly coupling their business systems.

allows organizations to cooperate without tightly coupling their business systems. 3. Geographically dispersed units: - JMS can ensure safe exchange

(9)

dispersed units of an organization. dispersed units of an organization.

4. One to many applications: - The applications that have to push data in packet to huge number of  4. One to many applications: - The applications that have to push data in packet to huge number of  clients in a one-to-many fashion are good can

clients in a one-to-many fashion are good candidates for the use JMS. Typical such applications aredidates for the use JMS. Typical such applications are Auction Sites, Stock Quote Services etc.

Auction Sites, Stock Quote Services etc.

What is the use of Message object? What is the use of Message object?

Message is a light weight message having on

Message is a light weight message having only header and properties and no ly header and properties and no payload. Thus if thepayload. Thus if the received are to be notified abt an event, and no data needs to be exchanged then using Message can be received are to be notified abt an event, and no data needs to be exchanged then using Message can be very efficient.

very efficient.

What is the basic difference between Publish Subscribe model and P2P model? What is the basic difference between Publish Subscribe model and P2P model?

Publish Subscribe model is typically used in one-to-many situation. It is unreliable but very fast. P2P Publish Subscribe model is typically used in one-to-many situation. It is unreliable but very fast. P2P model is used in one-to-one situation. It is highly reliable.

model is used in one-to-one situation. It is highly reliable.

What is the use of BytesMessage? What is the use of BytesMessage?

BytesMessage contains an array of primitive bytes in it's payload. Thus it can

BytesMessage contains an array of primitive bytes in it's payload. Thus it can be used for transfer of be used for transfer of  data between two applications in their native

data between two applications in their native format which may not be compatible with other format which may not be compatible with other MessageMessage types. It is also useful where JMS is used purely as a transport between

types. It is also useful where JMS is used purely as a transport between two systems and the messagetwo systems and the message  payload is opaque to the

 payload is opaque to the JMS client. Whenever you store any primitive type, it is converted into it'sJMS client. Whenever you store any primitive type, it is converted into it's  byte representation and then stored in the

 byte representation and then stored in the payload. There is no boundary line payload. There is no boundary line between the different databetween the different data types stored. Thus you can even read

types stored. Thus you can even read a long as short. This would result in a long as short. This would result in erroneous data and hence erroneous data and hence it isit is advisable that the payload be read in the same order and using the same type in which it was created by advisable that the payload be read in the same order and using the same type in which it was created by the sender.

the sender.

What is the use of StreamMessage? What is the use of StreamMessage?

StreamMessage carries a stream of Java primitive types as it's payload. It contains some conveient StreamMessage carries a stream of Java primitive types as it's payload. It contains some conveient methods for reading the data stored in the payload. However StreamMessage prevents reading a long methods for reading the data stored in the payload. However StreamMessage prevents reading a long value as short, something that is allwed in

value as short, something that is allwed in case of BytesMessage. This is so because thecase of BytesMessage. This is so because the StreamMessage also writes the type information alonwgith the value of the

StreamMessage also writes the type information alonwgith the value of the primitive type and enforcesprimitive type and enforces a set of strict conversion rules which actually prevents reading

a set of strict conversion rules which actually prevents reading of one primitive type as another.of one primitive type as another.

What is the use of TextMessage? What is the use of TextMessage?

TextMessage contains instance of java.lang.String as it's payload. Thus

TextMessage contains instance of java.lang.String as it's payload. Thus it is very useful for exchangingit is very useful for exchanging textual data. It can also be used for exchanging complex character data such as an XML document. textual data. It can also be used for exchanging complex character data such as an XML document.

Why do the JMS dbms_aqadm.add_subscriber and dbms_aqadm.remove_subscriber calls Why do the JMS dbms_aqadm.add_subscriber and dbms_aqadm.remove_subscriber calls

sometimes hang when there are concurrent enqueues or dequeues happening on the same queue sometimes hang when there are concurrent enqueues or dequeues happening on the same queue to which these calls are issued?

to which these calls are issued?

Add_subscriber and remove_subscriber are administrative operations on a queue. Though AQ does not Add_subscriber and remove_subscriber are administrative operations on a queue. Though AQ does not  prevent applications from issuing administrative and operational calls concurrently, they are executed  prevent applications from issuing administrative and operational calls concurrently, they are executed

serially. Both add_subscriber and remove_subscriber will block until pending

serially. Both add_subscriber and remove_subscriber will block until pending transactions that havetransactions that have enqueued or dequeued messages commit and release the resources they hold. It is expected that adding enqueued or dequeued messages commit and release the resources they hold. It is expected that adding and removing subscribers will not be a frequent event. It will mostly be part of the setup for the

and removing subscribers will not be a frequent event. It will mostly be part of the setup for the application. The behavior you observe

application. The behavior you observe will be acceptable in most cases. The will be acceptable in most cases. The solution is to try to isolatesolution is to try to isolate the calls to add_subscriber and remove_subscriber at the setup or cleanup phase when there are no the calls to add_subscriber and remove_subscriber at the setup or cleanup phase when there are no other operations happening on the

other operations happening on the queue. That will make sure that they queue. That will make sure that they will not stay blocked waitingwill not stay blocked waiting for operational calls to release resources.

for operational calls to release resources.

Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise JMSException with the message "ORA - 4020 - deadlock detected while trying to lock object"? JMSException with the message "ORA - 4020 - deadlock detected while trying to lock object"?

(10)

CreateDurableSubscriber and unsubscribe calls require exclusive access to the

CreateDurableSubscriber and unsubscribe calls require exclusive access to the Topics. If there areTopics. If there are  pending JMS operations (send/publish/receive) on the same Topic

 pending JMS operations (send/publish/receive) on the same Topic before these calls are issued, thebefore these calls are issued, the ORA - 4020 exception

ORA - 4020 exception is raised.is raised.

There are two solutions to the problem: There are two solutions to the problem:

1. Try to isolate the calls to createDurableSubscriber and u

1. Try to isolate the calls to createDurableSubscriber and u nsubscribe at the setup or cleanup pnsubscribe at the setup or cleanup phasehase when there are no other

when there are no other JMS operations happening on the Topic. JMS operations happening on the Topic. That will make sure that the requiredThat will make sure that the required resources are not held by other JMS operational ca

resources are not held by other JMS operational ca lls. Hence the error ORA - 4020 lls. Hence the error ORA - 4020 will not be raised.will not be raised. 2. Issue a TopicSession.commit call before calling createDurableSubscriber and unsub

2. Issue a TopicSession.commit call before calling createDurableSubscriber and unsub scribe call.scribe call.

Why doesn't AQ_ADMINISTRATOR_ROLE or AQ_USER_ROLE always work for AQ Why doesn't AQ_ADMINISTRATOR_ROLE or AQ_USER_ROLE always work for AQ applications using Java/JMS API?

applications using Java/JMS API?

In addition to granting the roles, you wo

In addition to granting the roles, you would also need to grant execuuld also need to grant execute to the user on the te to the user on the followingfollowing  packages:

 packages:

* grant execute on sys.dbms_aqin to <userid> * grant execute on sys.dbms_aqin to <userid> * grant execute on sys.dbms_aqjms to <userid> * grant execute on sys.dbms_aqjms to <userid>

Why do I get java.security.AccessControlException when using JMS MessageListeners from Why do I get java.security.AccessControlException when using JMS MessageListeners from Java stored procedures inside Oracle8i JServer?

Java stored procedures inside Oracle8i JServer?

To use MessageListeners inside Oracle8i JServer, you can do one for the following To use MessageListeners inside Oracle8i JServer, you can do one for the following 1. GRANT JAVASYSPRIV to <userid>

1. GRANT JAVASYSPRIV to <userid>

Call dbms_java.grant_permission ('JAVASYSPRIV', 'SYS:java.net.SocketPermission', '*', Call dbms_java.grant_permission ('JAVASYSPRIV', 'SYS:java.net.SocketPermission', '*', 'accept,connect,listen,resolve');

'accept,connect,listen,resolve');

What is the use of ObjectMessage? What is the use of ObjectMessage?

ObjectMessage contains a Serializable java object as

ObjectMessage contains a Serializable java object as it's payload. Thus it allows exchange of Javait's payload. Thus it allows exchange of Java objects between applications. This in itself mandates that both the applications be Java applications. objects between applications. This in itself mandates that both the applications be Java applications. The consumer of the message must typecast the object received to it's appropriate type. Thus the The consumer of the message must typecast the object received to it's appropriate type. Thus the consumer should before hand know

consumer should before hand know the actual type of the object sent the actual type of the object sent by the sender. Wrong type castingby the sender. Wrong type casting would result in ClassCastException. Moreover the class definition of the object set in the payload

would result in ClassCastException. Moreover the class definition of the object set in the payload should be available on bo

should be available on both the machine, the sender as th the machine, the sender as well as the consumer. If the class definition iswell as the consumer. If the class definition is not available in the consumer

not available in the consumer machine, an attempt to type cast would machine, an attempt to type cast would result inresult in ClassNotFoundException. Some of the MOMs might support dynamic loading of

ClassNotFoundException. Some of the MOMs might support dynamic loading of the desired class over the desired class over  the network, but the JMS specification does not mandate this behavior and would be a value added the network, but the JMS specification does not mandate this behavior and would be a value added service if provided by your vendor. And relying on any such vendor specific functionality would service if provided by your vendor. And relying on any such vendor specific functionality would hamper the portability of your application. Most of the time the

hamper the portability of your application. Most of the time the class need to be puclass need to be put in the classpath of t in the classpath of   both, the sender and the consumer, manually by the developer.

 both, the sender and the consumer, manually by the developer.

What is the use of MapMessage? What is the use of MapMessage?

A MapMessage carries name-value pair as it's payload. Thu

A MapMessage carries name-value pair as it's payload. Thu s it's payload is similar to thes it's payload is similar to the  java.util.Properties object of Java. The values can be Java primitives or their wrappers.  java.util.Properties object of Java. The values can be Java primitives or their wrappers.

What is the difference between BytesMessage and StreamMessage? What is the difference between BytesMessage and StreamMessage?

BytesMessage stores the primitive data types by converting them to their byte representation. Thus the BytesMessage stores the primitive data types by converting them to their byte representation. Thus the message is one contiguous stream of bytes. While the

message is one contiguous stream of bytes. While the StreamMessage maintains a boundary betweenStreamMessage maintains a boundary between the different data types stored because it also stores the type information along with the value of the the different data types stored because it also stores the type information along with the value of the  primitive being stored. BytesMessage allows data to be read using

 primitive being stored. BytesMessage allows data to be read using any type. Thus even if your payloadany type. Thus even if your payload contains a long value, you

contains a long value, you can invoke a method can invoke a method to read a short and to read a short and it will return you something. It willit will return you something. It will not give you a semantically correct data b

(11)

This is strictly prohibited in the StreamMessage. It maintains the type information of the data being This is strictly prohibited in the StreamMessage. It maintains the type information of the data being stored and enforces strict conversion rules on the d

stored and enforces strict conversion rules on the d ata being read.ata being read.

What is object message ? What is object message ?

Object message contains a group of serializeable java object. So it allows exchange of Java objects Object message contains a group of serializeable java object. So it allows exchange of Java objects  between applications. sot both the applications must be Java applications.

 between applications. sot both the applications must be Java applications.

What is text message? What is text message?

Text messages contains String messages (since being widely used, a separate messaging Type has been Text messages contains String messages (since being widely used, a separate messaging Type has been supported) . It is useful for exchanging textual d

supported) . It is useful for exchanging textual d ata and complex character ata and complex character data like XML.data like XML.

What is Map message? What is Map message?

map message contains name value

map message contains name value Pairs. The values can be of Pairs. The values can be of type primitives and its wrappers. Thetype primitives and its wrappers. The name is a string.

name is a string.

What is the difference between queue and topic ? What is the difference between queue and topic ?

A topic is typically used for one to many messaging

A topic is typically used for one to many messaging , while queue is used for o, while queue is used for one-to-one messaging.ne-to-one messaging. Topic .e. it supports publish subscribe model of

Topic .e. it supports publish subscribe model of messaging where queue supports Point to Pointmessaging where queue supports Point to Point Messaging.

Messaging.

What are the three components of a Message ? What are the three components of a Message ?

A1: A1:

A jms message has three components A jms message has three components 1. A header  1. A header  2. Properties (Optional) 2. Properties (Optional) 3. A body (Optional) 3. A body (Optional) A2: A2:

A JMS message consists of three parts: A JMS message consists of three parts:

Message header - For message identification. For example, the

Message header - For message identification. For example, the header is used to determine if a header is used to determine if a givengiven message is appropriate for a "subscriber"

message is appropriate for a "subscriber"

Properties - For application-specific, provider-specific, and optional header fields Properties - For application-specific, provider-specific, and optional header fields

Body - Holds the content of the message. Several formats are supported, including TextMessage, which Body - Holds the content of the message. Several formats are supported, including TextMessage, which wrap a simple String, that wrap arbitrary Java objects (which must be

wrap a simple String, that wrap arbitrary Java objects (which must be serializable). Other formats areserializable). Other formats are supported as well.

supported as well.

What is the difference between queue and topic? What is the difference between queue and topic?

A1: A1:

A connection is created between the client and the server from a connection factory. Connections can A connection is created between the client and the server from a connection factory. Connections can  be shared by several threads. The

 be shared by several threads. The user credentials are supplied at this level. It is probably common user credentials are supplied at this level. It is probably common for afor a client application to share access to a

client application to share access to a single connection to the server (unless different securitysingle connection to the server (unless different security

credentials are required for different destinations). A session is created from a connection. The session credentials are required for different destinations). A session is created from a connection. The session may only be used by one

may only be used by one thread at one time. The thread at one time. The user credentials are inherited from the parentuser credentials are inherited from the parent connection.

connection.

It is probably common for each MessageProducer (TopicPublisher or QueueSender) or  It is probably common for each MessageProducer (TopicPublisher or QueueSender) or  MessageConsumer (TopicSubscriber or QueueReceiver) to have their own

MessageConsumer (TopicSubscriber or QueueReceiver) to have their own session due to the threadingsession due to the threading restriction. You can look at it like a

restriction. You can look at it like a tree. At the top you have tree. At the top you have a connection factory, beneath a connection factory, beneath this youthis you have your connections and then beneath the connections you have sessions. The leaves of the tree are have your connections and then beneath the connections you have sessions. The leaves of the tree are the JMS actors (MessageProducers and

(12)

A2: A2:

Both work on 2 different comminication models. Qu

Both work on 2 different comminication models. Qu eue is point-to-point and topic is publish-eue is point-to-point and topic is publish-subscriber.

subscriber. A3:

A3:

In queues, one message can be consumed by only one client. But in the topics, one message can be In queues, one message can be consumed by only one client. But in the topics, one message can be consumed by many clients. Both are separate

consumed by many clients. Both are separate domains in MOM.domains in MOM.

Queue represent Point-To-Point domain and Topic represent Pub/Sub domain Queue represent Point-To-Point domain and Topic represent Pub/Sub domain A4:

A4:

A point-to-point (PTP) product or application is built around the concept

A point-to-point (PTP) product or application is built around the concept of message queues, senders,of message queues, senders, and receivers. Each message is addressed to

and receivers. Each message is addressed to a specific queue, and receiving a specific queue, and receiving clients extract messagesclients extract messages from the queue(s) established to hold their messages. Queues retain

from the queue(s) established to hold their messages. Queues retain all messages sent to them until theall messages sent to them until the messages are consumed or until the messages

messages are consumed or until the messages expire.expire.

In a publish/subscribe (pub/sub) product or application, clients address messages to

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishersa topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to

and subscribers are generally anonymous and may dynamically publish or subscribe to the contentthe content hierarchy. The system takes care of distributing the messages arriving from a topic's multiple hierarchy. The system takes care of distributing the messages arriving from a topic's multiple

 publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them  publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them

to current subscribers. to current subscribers.

What are the types of messaging? What are the types of messaging?

There are two kinds of Messaging. Synchronous messaging involves

There are two kinds of Messaging. Synchronous messaging involves a client that waits for the server toa client that waits for the server to respond to a message. Asynchronous messaging involves a

respond to a message. Asynchronous messaging involves a client that does not wait for a client that does not wait for a message frommessage from the server. An event is used

the server. An event is used to trigger a message from a server.to trigger a message from a server.

What is the difference between Point to Point and Publish/Subscribe What is the difference between Point to Point and Publish/Subscribe

Point-to-point (P2P) Point-to-point (P2P)

In point-to-point, messages are sent via queues. Messages are

In point-to-point, messages are sent via queues. Messages are put onto the queues bput onto the queues by the messagey the message  producers (the clients). The message consumer is responsible for pulling the message from the queue.  producers (the clients). The message consumer is responsible for pulling the message from the queue.

Point-to-point is typically used when a given message must be processed (received) only once by a Point-to-point is typically used when a given message must be processed (received) only once by a given consumer. In this way, there is only one consumer of the given message.

given consumer. In this way, there is only one consumer of the given message. Publish-and-subscribe (pub/sub)

Publish-and-subscribe (pub/sub)

In publish-and-subscribe, messages are sent through topics. Messages are published

In publish-and-subscribe, messages are sent through topics. Messages are published to topics by theto topics by the message producers. The messages may be received

message producers. The messages may be received by any consumers that subscribe to the given by any consumers that subscribe to the given topic.topic. In this way, a message may be

In this way, a message may be received, or processed, by multiple consumers.received, or processed, by multiple consumers.

Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of  Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of  delivery?

delivery?

Some messaging systems provide synchronous delivery to destinations as a mechanism for  Some messaging systems provide synchronous delivery to destinations as a mechanism for  implementing reliable applications. Some systems provide clients with various forms of delivery implementing reliable applications. Some systems provide clients with various forms of delivery notification so that the clients can detect dropp

notification so that the clients can detect dropped or ignored messages. This is not the ed or ignored messages. This is not the model defined bymodel defined by the JMS API. JMS API messaging provides guaranteed delivery via the once-and-o

the JMS API. JMS API messaging provides guaranteed delivery via the once-and-o nly-once deliverynly-once delivery semantics of PERSISTENT messages. In addition, message consumers can insure reliable processing 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 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 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 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

(13)

application-level acknowledgment message. application-level acknowledgment message.

What are the core JMS-related objects required for each JMS-enabled application? What are the core JMS-related objects required for each JMS-enabled application?

Each JMS-enabled client must establish the following: Each JMS-enabled client must establish the following: * A connection object

* A connection object provided by the JMS server (the message broker)provided by the JMS server (the message broker)

* Within a connection, one or more sessions, which provide a context for message sending and * Within a connection, one or more sessions, which provide a context for message sending and receiving

receiving

* Within a session, either a queue

* Within a session, either a queue or topic object representing the destination (the message or topic object representing the destination (the message stagingstaging area) within the message broker 

area) within the message broker 

* Within a session, the appropriate sender or publisher or receiver or subscriber object (depending on * 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 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)

strategy, respectively). Within a session, a message object (to send or to receive)

How does the Application server handle the JMS Connection? How does the Application server handle the JMS Connection?

1. App server creates the server session and

1. App server creates the server session and stores them in a pool.stores them in a pool. 2. Connection consumer uses the

2. Connection consumer uses the server session to put messages in the session of the JMS.server session to put messages in the session of the JMS. 3. Server session is the one that spawns the

3. Server session is the one that spawns the JMS session.JMS session.

4. Applications written by Application programmers creates the message listener. 4. Applications written by Application programmers creates the message listener.

What is Stream Message ? What is Stream Message ?

Stream messages are a group of java p

Stream messages are a group of java primitives. It contains some convenient methods for reading therimitives. It contains some convenient methods for reading the data. However Stream Message prevents reading a

data. However Stream Message prevents reading a long value as short. This is so blong value as short. This is so because the Streamecause the Stream Message also writes the type information along with the value

Message also writes the type information along with the value of the primitive type and enforces a setof the primitive type and enforces a set of strict conversion rules which actually prevents reading of one

References

Related documents

 ILHIE Direct allows you to send and receive messages of up to 125 megabytes in size, and regular email.. Frequently Asked

These ventures include Social Advancement Fund (SAF), Grameen Trust, Grameen Fund, Grameen Communications, Grameen Shakti (Grameen Energy), Grameen Telecom, Grameen Shikkha

Learn to develop applications with the following technologies: Enterprise JavaBeans (EJB), Java Persistence API (JPA), JDBC, Java Transaction API (JTA), Contexts and

The intervention aimed to increase provider acceptability, implementation, and perceived usefulness of current guidelines and evidence-based methods, as well as decrease antibiotic

Aircraft being used as ambulances are equipped with medical devices, medicinal products and rescue equipment to enable the medical personnel to provide continuous patient care.

In this study the status of children tuberculosis was divided into tuberculosis disease, tuberculosis exposure and tuberculosis infection based on tuberculin tests and

【Legend】 Hitachi Branch Joso Branch Utsunomiya Branch Gunma Branch Kumagaya Branch ⑤ ④ ③ ② ① ShinNegishi Line Joso Line Chiba Line Subsea Line Saitama Line Yokohama Line

Upvote if it of receiver for high quality and updates to choose the technical information has been redesigned to use citrix receiver to take all waiting for the files.. Question