Java EJB Programming Question:

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

Tweet Share WhatsApp

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 PDF Read All 27 Java EJB Programming Questions
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?