Pattern two is a little more complicated. In this pattern, Curly wants to show the credit limit for three different customers. The final pattern is a variant on pattern two. In this pattern, Curly is not using the Customer directly, but is interacting indirectly through some other blob of software. But initialization costs are usually not important in this type of scenario.
Initialization occurs very infrequently.
The much more important cost is the cost of executing the main body, which happens over and over, perhaps thousands of times for every one initialization. The main body using the session bean will execute much faster than the main body using the entity bean. The session code completely eliminates the cost of the reference creation. So let s summarize the state of affairs. If we use an entity bean instead of a session bean, we get a questionable improvement in aesthetics and no improvement in functionality.