The high-level architecture of JAXR consists of the following parts:
A JAXR client: This is a client program that uses the JAXR API to access a registry through a JAXR provider.
A JAXR provider: This is an implementation of the JAXR API that provides access to a specific registry provider or to a class of registry providers that are based on a common specification. This guide does not describe how to implement a JAXR provider.
A JAXR provider implements two main packages:
javax.xml.registry, which consists of the API interfaces and classes that define the registry access interface.
javax.xml.registry.infomodel, which consists of interfaces that define the information model for JAXR. These interfaces define the types of objects that reside in a registry and how they relate to each other. The basic interface in this package is the RegistryObject interface.
The most basic interfaces in the javax.xml.registry package are
Connection. The Connection interface represents a client session with a registry provider. The client must create a connection with the JAXR provider in order to use a registry.
RegistryService. The client obtains a RegistryService object from its connection. The RegistryService object in turn enables the client to obtain the interfaces it uses to access the registry.
The primary interfaces, also part of the javax.xml.registry package, are
QueryManager and BusinessQueryManager, which allow the client to search a registry for information in accordance with the javax.xml.registry.infomodel interfaces. An optional interface, DeclarativeQueryManager, allows the client to use SQL syntax for queries. The ebXML provider for the Registry implements DeclarativeQueryManager.
LifeCycleManager and BusinessLifeCycleManager, which allow the client to modify the information in a registry by either saving the information (updating it) or deleting it.
For more details, and for a figure that illustrates the relationships among these interfaces, see the API documentation for the javax.xml.registry package at http://java.sun.com/j2ee/1.4/docs/api/javax/xml/registry/package-summary.html.
When an error occurs, JAXR API methods throw a JAXRException or one of its subclasses.
Many methods in the JAXR API use a Collection object as an argument or a returned value. Use of a Collection object allows operations on several registry objects at a time.
Figure 1–1 illustrates the architecture of JAXR. For the Registry, a JAXR client uses the capability level 0 and level 1 interfaces of the JAXR API to access the JAXR provider, which is an ebXML provider. The JAXR provider in turn accesses the Registry, an ebXML registry.