Q&A
Q1: | What sort of state can stateless Session beans have? |
A1: | Somewhat surprisingly, stateless Session beans can store state, but it must be independent of the client. A connection to a database or a reference to another EJB that is not specific to any given client is a typical example of client independent state. |
Q2: | What is the prefix that will appear in all JNDI lookups? |
A2: | The java:comp/env context is guaranteed to exist in a J2EE environment. |
Q3: | How are EJB system exceptions different from regular Java exceptions? |
A3: | A RemoteException can be caused by network problems, which, in the context of distributed J2EE enterprise applications, represent a system-level rather than an application-level exception. |
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.