KyaPoocha.com

Huge Collection of Interview Questions


Archive for October, 2006

What is the difference between EJB and Java beans? 

EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.  Read more »

What is EJB role in J2EE? 

EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.  Read more »

Are we allowed to change the transaction isolation property in middle of a transaction? 

No, You cannot change the transaction isolation level in the middle of transaction.  Read more »

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... Read more »

What happens to messages if a transaction is rolled back? 

All consumed messages are re-delivered.  Read more »

Messages are not successful until they have been acknowledged. What are the types of acknowledgments? 

1)Acknowledgment by commit. – Acknowledgement happens automatically when a transaction is committed. 2)Session.AUTO_ACKNOWLEDGE 3)Session.CLIENT_ACKNOWLEDGE –... Read more »

Describe the lifecycle of a receiver application in order to receive a message? 

Use the JNDI to get a ConnectionFactory and Destination Object (either Queue or Topic).Create a Connection object. Create a Session object. Create MessageConsumer... Read more »

Describe the lifecycle of a sender application in order to send a message? 

Use the JNDI to get a ConnectionFactory and Destination Object (either Queue or Topic).Create a Connection object. Create a Session object. Create MessageProducer... Read more »

What are the 5 types of Messages? 

StreamMessage, MapMessage (key-value pair), BytesMessage, TextMessage and ObjectMessage (serialized objects).  Read more »

What information is stored in the Header of a ‘Message’? 

Message identification and routing information.  Read more »

What are the three components of a ‘Message’? 

Header, Properties and Body.  Read more »

How does the JMS API relax the timing dependency between publishers and subscribers in publish-and-subscribe messaging model? 

Using “durable subscription”, the subscribers can receive messages sent even when the subscribers are not active. ConnectionConsumer createDurableConnectionConsumer(…) This... Read more »

How does a message consumer filters messages? 

Consumers can filter messages using message selector. Developer has to specify a message selector (String) as an argument when we create a message consumer. createConnectionConsumer... Read more »

What are the two different types of messaging models that are supported by JMS? 

1) Point-to-Point 2) Publish and Subscribe. Point-to-Point messaging consists of queues, senders and receivers. A message can be received by only one receiver. Receiver... Read more »

Why would you choose JMS over RMI? 

JMS is loosely coupled and RMI (remote method invocation) is tightly coupled (dependency between objects). In RMI, the senders have to wait for the immediate response... Read more »

Page 3 of 5«12345»