May 2001
Intermediate to advanced
1088 pages
30h 13m
English
One of the most common patterns you see in three-tiered applications is the use of view objects. Remember, you want to reduce the number of calls you make from the client to the EJB container. If you need to retrieve a large number of fields from an EJB, either a session bean or an entity bean, you want to retrieve the values with a single method call.
You package all the values you want into a view class, which contains all the data items you want to retrieve. For example, Listing 12.1 shows a PersonView class holding all the data for a Person bean.
package usingj2ee.addressbook; public class PersonView implements java.io.Serializable { public String firstName; public ... |
Read now
Unlock full access