Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Server-side Java: Build distributed applications with Java and XML

Use Xbeans to process your XML as DOM Documents

  • Print
  • Feedback

Page 5 of 5

Other approaches

You can take other approaches when sending XML across process boundaries. To reduce the space required, you can compress both the textual representation and the serialized DOM representation.

You can use other transports besides HTTP, RMI, and CORBA; for example, you can use email or FTP. In environments with shared network file systems, the sender and receiver can exchange XML data via the file system.

Conclusion

As you've seen, there are several approaches to sending XML from here to there in a Java distributed application. Each approach makes different performance and interoperability tradeoffs.

It is important to abstractthe communication of XML from the rest of the distributed application logic. That is, the code that sends and receives XML should be separate from the code implementing the application logic. By packaging the code as software components, you can change the implementations of the sender and the receiver without affecting the rest of the application.

You can obtain the complete three sender and receiver implementations described here for free at Xbeans.org.

The authors of this month's server-side Java computing articles will be holding a free online seminar on February 10 at 10 a.m. PST. Register to join at http://seminars.jguru.com.

About the author

Bruce Martin is one of the pioneers of distributed object computing. At Hewlett-Packard Laboratories in the early '90s, he designed and implemented an interface definition language that became the basis for HP's original CORBA submission. At Sun Microsystems, he was one of Sun's CORBA architects and was the primary author of five of the OMG's CORBA Services specifications. At Inprise, Bruce was an architect and developer of the company's first CORBA-based Java Application Server. Bruce has extensive practical experience with Java, XML, and the DOM. JavaWorld and jGuru have formed a partnership to help the community better understand server-side Java technology. Together, JavaWorld and jGuru are jointly producing articles, free educational Web events, and working together on the JavaWorld bookstore and Web-based training.

Read more about Enterprise Java in JavaWorld's Enterprise Java section.

  • Print
  • Feedback