Q&A

Q1:What do Entity beans represent?
A1: Entity beans represent persistent data that can be accessed and shared by many clients.
Q2:What are the two types of Entity beans?
A2: The two types of Entity beans are BMP and CMP.
Q3:Why are local interfaces preferable to remote interfaces for Entity beans?
A3: Local interfaces perform better because there is no network traffic when calling a bean through its local interface, and there is also no need to clone serializable objects.
Q4:How does a BMP Entity bean know what its primary key is?
A4: The primary key can either be passed as an argument of ejbCreate(), or it could be generated by the database, or it could be generated by some other bean, or it might be generated as a pseudo-random value using ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.