Java Reference
In-Depth Information
widely advocated for any distributed technology, including
CORBA, EJB, and DCOM. Basically, the lower the
distribution "cross-section" of your application, the less time
will be wasted in overhead caused by multiple, repeated
network hops for small pieces of data. The way to accomplish
this is to create very large-grained "facade" objects that wrap
logical subsystems and that can accomplish useful business
functions in a single method call. Not only will this reduce
network overhead, but within EJBs, it also critically reduces
the number of database calls by creating a single transaction
context for the entire business function. This is actually one
of
the
core
principles
of
Service
Oriented
Architecture
(SOA).
EJB specification, provide performance optimization for
co-located EJBs. Local interfaces must be explicitly invoked
by your application, requiring code changes and preventing
the ability to later distribute the EJB without application
changes. If you are certain the EJB call will always be local,
take advantage of the optimization of local EJBs. However,
the implementation of the session facade itself, typically a
stateless session bean, should be designed for remote
interfaces. This way, the EJB itself can be used remotely by
other clients without major breakage to existing business
logic.
For performance optimization, a local interface can be added
to the session facade. This takes advantage of the fact that
most of the time, in Web applications at least; your EJB client
and the EJB will be co-located within the same JVM.
Alternatively, Java EE application server configuration
optimizations, such as WebSphere "No Local Copies," can be
used if the session facade is invoked locally but using the
Search WWH ::




Custom Search