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

Answers were Sorted based on User's Feedback



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

Answer / geetanand

IT SHOULD NOT BE PRIMITIVE. IT SHOULD BE AN OBJECT. AND IN
JAVA WE CAN CREATE OBJECTS OF ANY TYPE USING WRAPPER CLASSES.
SO WE CAN USE THIS WRAPPER CLASS OBJECTS.

Is This Answer Correct ?    4 Yes 0 No

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

Answer / kameshwar

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)

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More EJB Interview Questions

What is the advantage of using entity bean for database operations, over directly using jdbc api to do database operations? When would I use one over the other?

0 Answers  


How can I access ejb from asp?

0 Answers  


How can enterprise javabeans be accessed from active server pages?

0 Answers  


What is entity bean in ejb?

0 Answers  


What are ejb containers?

0 Answers  


Enlist the changes in EJB 2.1 ?

0 Answers  


An instance of stateful session ejb when accessed simultaneously from more than one clients on same vm results in remoteexception or ejbexception. In case the client is a servlet thread, which of the techniques can be used to avoid remoteexception/ejbexception?

0 Answers  


What is activemq used for?

0 Answers  


Explain the Sotware Architechture of EJB?

1 Answers   Wipro,


what is the difference between stateless and stateful sessions?

10 Answers   HCL,


What is Enterprise JavaBeans Query Language (EJB QL)?

0 Answers  


What is session bean in ejb?

0 Answers  


Categories