194
Performance Considerations
cache document content (DOM tree or JAXB content tree) in the user's session on
the interaction or presentation layer to avoid repeatedly invoking the business logic.
However, you quickly consume more memory when you cache the result of a
user request to serve subsequent, related requests. When you take this approach,
keep in mind that it must not be done to the detriment of other users. That is, be
sure that the application does not fail because of a memory shortage caused by
holding the cached results. To help with memory management, use soft refer 
ences, which allow more enhanced interaction with the garbage collector to
implement caches.
When caching a DOM tree in the context of a distributed Web container, the
reference to the tree stored in an HTTP session may have to be declared as
transient
. This is because 
HttpSession
 requires objects that it stores to be Java
serializable, and not all DOM implementations are Java serializable. Also, Java
serialization of a DOM tree may be very expensive, thus countering the benefits
of caching.
4.5.7 Use XML Judiciously
Using XML documents in a Web services environment has its pluses and minuses.
XML documents can enhance Web service interoperability: Heterogeneous, loosely
coupled systems can easily exchange XML documents because they are text docu 
ments. However, loosely coupled systems must pay the price for this ease of
interoperability, since the parsing that these XML documents require is very expen 
sive. This applies to systems that are loosely coupled in a technical and an enterprise
sense. 
Contrast this with tightly coupled systems. System components that are
tightly coupled can use standard, nondocument oriented techniques (such as RMI)
that are far more efficient in terms of performance and require far less coding
complexity. Fortunately, with technologies such as JAX RPC and JAXB you can
combine the best of both worlds. Systems can be developed that are internally
tightly coupled and object oriented, and that can interact in a loosely coupled, doc 
ument oriented manner.






New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting

 

 

 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting

 

Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved