March 2002
Beginner to intermediate
528 pages
10h 12m
English
The topics that follow apply to both session and entity beans.
Stored in an enterprise bean’s deployment descriptor, an environment entry is a name-value pair that allows you to customize the bean’s business logic without changing its source code. An enterprise bean that calculates discounts, for example, might have an environment entry named Discount Percent. Before deploying the bean’s application, you could run deploytool and assign DiscountPercent avalue of .05 on the Env. Entries tab. (See Figure 4-2.) When you run the application, the enterprise bean fetches the .05 value from its environment.
In the following code example, the ...