Tag: architecture

Questions Related to architecture

  1. void setContext()

  2. void ejbLoad()

  3. void ejbDelete()

  4. void ejbEvict()


Correct Option: B
  1. EntityBean

  2. StatefulSession Bean

  3. MessageDrivenBean

  4. StatelessSessionBean


Correct Option: C
  1. construction

  2. destruction

  3. activation

  4. passivation

  5. All the above


Correct Option: E
  1. Bean Provider

  2. Application Assembler

  3. Deployer

  4. System Administrator


Correct Option: B
  1. Every entity must have a primary key

  2. It is not necessary to define primary key for an Entity

  3. @Primary annotation is used for denoting a simple primary key

  4. All the above


Correct Option: A
Explanation:

To solve this question, the user needs to understand the basics of entity beans and their primary keys.

A) Every entity must have a primary key. This statement is true as the primary key is used to uniquely identify each entity bean in the database. Without a primary key, it would be impossible to distinguish between different instances of the same entity.

B) It is not necessary to define a primary key for an Entity. This statement is false. As mentioned above, every entity must have a primary key. It is not optional.

C) @Primary annotation is used for denoting a simple primary key. This statement is false. @Primary annotation is not a built-in annotation in Java Persistence API (JPA). Instead, the @Id annotation is used to denote a primary key.

D) Option B is incorrect. Therefore, the correct answer is:

The Answer is: A

  1. EJB architecture defines distributed component based architecture for business applications

  2. EJB is a standard that is built on top of Web Services architecture

  3. EJB Architecture is language independent, meaning that it is possible to write components using any programming language.

  4. none


Correct Option: A