|
INTERVIEW QUESTIONS
J2EE
JMS
DETAILS
Question: What is the use of ObjectMessage?
Answer: ObjectMessage contains a Serializable java object as it's payload. Thus it allows exchange of Java 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 consumer should before hand know the actual type of the object sent by the sender. Wrong type casting would result in ClassCastException. Moreover the class definition of the object set in the payload should be available on both the machine, the sender as well as the consumer. If the class definition is not available in the consumer machine, an attempt to type cast would result in ClassNotFoundException. Some of the MOMs might support dynamic loading of the desired class over 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 hamper the portability of your application. Most of the time the class need to be put in the classpath of both, the sender and the consumer, manually by the developer.
|
|
|
Category |
JMS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7807 users |
Added on |
10/29/2014 |
Views |
69198 |
Rate it! |
|
|
Question:
What is the use of ObjectMessage?
Answer:
ObjectMessage contains a Serializable java object as it's payload. Thus it allows exchange of Java 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 consumer should before hand know the actual type of the object sent by the sender. Wrong type casting would result in ClassCastException. Moreover the class definition of the object set in the payload should be available on both the machine, the sender as well as the consumer. If the class definition is not available in the consumer machine, an attempt to type cast would result in ClassNotFoundException. Some of the MOMs might support dynamic loading of the desired class over 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 hamper the portability of your application. Most of the time the class need to be put in the classpath of both, the sender and the consumer, manually by the developer. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the use of MapMessage?
|
View Answer
|
|
What is the difference between BytesMessage and StreamMessage?
|
View Answer
|
|
What is object message ?
|
View Answer
|
|
What is text message?
|
View Answer
|
|
What is Map message?
|
View Answer
|
|
What is the difference between queue and topic ?
|
View Answer
|
|
What are the three components of a Message ?
|
View Answer
|
|
What is the difference between queue and topic?
|
View Answer
|
|
What are the types of messaging?
|
View Answer
|
|
What is the difference between Point to Point and Publish/Subscribe
|
View Answer
|
|
Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of delivery?
|
View Answer
|
|
What are the core JMS-related objects required for each JMS-enabled application?
|
View Answer
|
|
How does the Application server handle the JMS Connection?
|
View Answer
|
|
What is Stream Message ?
|
View Answer
|
|
What Is the JMS API?
|
View Answer
|
|
How JMS is different from RPC?
|
View Answer
|
|
What type messaging is provided by JMS ?
|
View Answer
|
|
What is JMS application ?
|
View Answer
|
|
What is the difference between Message producer and Message consumer?
|
View Answer
|
|
What is the difference between durable and non-durable subscriptions?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All JMS Interview Questions & Answers - Exam Mode /
Learning Mode
|