Java EJB Programming Question:

Download Job Interview Questions and Answers PDF

Can the primary key in the entity bean be a Java primitive type such as int?

Java EJB Programming Interview Question
Java EJB Programming Interview Question

Answer:

The primary key can’t be a primitive type. Use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive).

Download Java EJB Programming Interview Questions And Answers PDF

Previous QuestionNext Question
The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes? Can you control when passivation occurs?