Java Reference
In-Depth Information
I watch Eric line up his run on the easy Class II rapid in North Alabama. At the
bend, the river is about 45 feet wide, and there is only one danger spot: a notorious
feature called a pour-over. This one is easily visible. Merely five feet wide, it's diffi-
cult to hit. The bulk of the current swings around the bend, away from the pour-
over, but it appears Eric will hit it anyway. Although he's a beginner, we've prac-
ticed for months for this run. Texas has been dry, so our practice has been on slow
water. Eric can steer, power, and roll his kayak. He can even roll without a pad-
dle, a skill that belies his beginner status. When it's dry, it's easy to look for chal-
lenges in unlikely places. As we watch with amusement (and some apprehension),
Eric's brain appears to lock as he approaches the pour-over. He just stares, and it
pulls him in like a tractor beam. He goes over the powerful 2-foot wave behind the
rock and stares at the 4-foot drop and the powerful hydraulic beyond. He knows
that he's going to flip and maybe get hammered by the hole ... so what does he do?
He drops his paddle.
8.1
A brief Enterprise JavaBeans review
EJB s—the “bitter beans” of this chapter's title—build in extensive functionality
that dramatically simplifies database, message-oriented, and transactional pro-
gramming. This chapter will not cover message-oriented EJB s because they're
relatively new, and we programmers don't have enough experience to develop
antipatterns based on their use. A technology as complex and ambitious as this
must provide fertile grounds for antipatterns. We will not be disappointed.
In this chapter, we'll review the basic characteristics of EJB s and discuss
how they are built and deployed. Next, we'll return to our BBS application
and consider an EJB implementation. This time, since we have so much code,
we'll break away from the practice of providing a complete example, but we'll
include enough detail to give you the full flavor of the application. Next,
we'll revisit some existing antipatterns, such as Round-tripping, in greater
detail. We'll discuss what happens when we run into the antipattern Every-
thing Is an EJB , and then we'll see what happens when we make bad choices
for our EJB deployments.
8.1.1
The component-based distributed architecture
The EJB architecture is a component-based, distributed architecture. On the
server, a set of services support a container, which in turn supports the com-
ponents, called EJB s, within the container. The components can communicate
with clients via a stub approach. This is essentially the approach that CORBA ,
the distributed objects standard, uses to communicate between client and
Search WWH ::




Custom Search