Q&A

Q1:How many Java classes and interfaces must you write to create an EJB?
A1: The EJB writer must define a remote (or business) interface, a home interface, and the bean implementation itself.
Q2:Why does an EJB run inside a container?
A2: The container provides many services to the EJB, including distribution, lifecycle, naming/registration, transaction management, security/authentication, and persistence. If the container did not exist, you would have to write all the code to interact with these services yourself.
Q3:What issues are there in passing an object as part of a remote method call?
A3: To be passed as an argument or return type, an object must be either serializable or remote. If it is neither of these, an error will occur at runtime. ...

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.