262
inhibit server shutdown and impact performance. To alleviate this problem, the
work management contract enables the application server to pool and reuse
threads, similar to pooling and reusing connections.
In addition, the work management contract gives resource adapters more flex
ibility for using threads. The resource adapter can specify the execution con
text for a thread. The contract allows a requesting thread to block stop its own
execution until a work thread completes. Or, a requesting thread can block
while it waits to get a work thread; when the application server provides a work
thread, both the requesting and work threads execute in parallel. Yet another
option, a resource adapter can submit the work for the thread to a queue and
have it execute at some later point; the adapter continues its own execution
without waiting further. Thus, a resource adapter and a thread may execute in
conjunction with each other or independently, using a listener mechanism, if
need be, to notify the resource adapter that the work thread has completed.
Lifecycle management contract Enables an application server to manage the
lifecycle of a resource adapter. With this contract, the application server has a
mechanism to bootstrap a resource adapter instance at deployment or at server
startup, and to notify the adapter instance when it is undeployed or when the
server is shutting down.
6.2.4 Web Service and XML Technologies
Although messaging systems provide many of the same EAI advantages as Web ser
vices, Web services go a step further. Principally, Web services support multiple
vendors and the ability to go through firewalls using Internet standards. Web ser
vices also support a flexible XML format.
The J2EE 1.4 platform provides a rich set of Web service APIs and XML doc
ument manipulating technologies. The Web service APIs JAX RPC, JAXR,
SAAJ, JAXB, and JAXP provide standard Java APIs for integrating applica
tions and other systems. A Java application can use these APIs to obtain and use a
Web service. These APIs are particularly useful when an application or system
exposes a Web service layer explicitly for integration purposes.
There are also a number of XML related APIs and facilities in the Java lan
guage (and the J2EE 1.4 platform) that can be applied to integration problems.
They permit you to define an interface data model, manipulate disparate docu
ments, and perform transformations between data types. These XML APIs give
you the ability to structure a data model for passing data among different systems.
Chapter 2 discusses these technologies in greater depth.
<
New Page 1
Clan Web Hosting