Home / Interview / EJB :: General Questions

Interview :: EJB

11) What is Pub/Sub model?

In the Publisher/Subscriber model, one message is delivered to all subscribers. Here, Topic is used as a message-oriented middleware.

12) What is MDB?

Message Driven Bean (MDB) encapsulates business logic. It is invoked by passing the message. It is like JMS receiver.

13) What is Entity Bean?

Entity Bean is a server-side component that represents the persistent data. Since EJB 3.x, it is replaced by JPA.

14) What is Session Facade?

Session Facade is a design pattern to access enterprise bean through the local interface. It abstracts the business object interactions and provides a service layer. It makes the performance fast over the network.

15)

List some key actors in persistence API?

Some of the key actors in persistence API are:

  • Entity
  • EntityManager
  • Persistence unit
  • Data source

16)

List down the steps for the demonstration of EJP persistence mechanism?

  • Create a database table
  • Create entity classes for the table
  • Create persistent unit and data source
  • Create a stateless EJB
  • Update stateless EJBM
  • Console based application accesses the stateless EJB.
17)

Name the attributes of javax.ejb.Stateful?

  • Name
  • mappedName
  • Description
18)

Name the attributes of javax.ejb.EJB?

beanInterface

beanName

mappedName

19)

Mention the three levels for applying interceptor methods?

  • Default
  • Class
  • Method
20)

Mention the Java types that can be mapped using the @Lob annotation?

  • java.sql.Blob
  • String
  • byte[]
  • java.sql.Clob
  • Serializable Object