Connections

Connections encapsulate the underlying communication with a remote service. They are conceptually similar to the abstractions defined in JDBC's java.sql.Connection, or JMS's javax.jms.Connection. Generally speaking, connections tend to be heavyweight objects to instantiate, often requiring expensive operations such as creating socket pools, performing authentication, building up sessions on remote servers, and so on. It frequently makes sense for multiple threads to share a connection (assuming that the implementation is thread safe), instead of having each hold nearly identical resources. One of the examples you will develop near the end of this chapter demonstrates this.

JAXM has provided three special classes to implement simple ...

Get Java™ Web Services Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.