For an example of the use of a federated query, see JAXRQueryFederation.java in the directory install/registry-samples/query-federation/src. This example performs two queries, a declarative query and a stored query, on every federation it finds (the database provided with the Registry contains only one). Because the federation stored in the Registry database does not have a well-known identifier value, the example uses findObjects to locate the federation.
The declarative query is the query that is performed in Using Declarative Queries: Example. The stored query is the FindAllMyObjects query.
Because the federation in the Registry database has no members, this example cannot perform the queries.
Go to the directory install/registry-samples/query-federation.
Type the following command:
Ant-base/ant run |
The output of the run target looks something like this:
run: [java] Query URL is http://localhost:6480/soar/registry/soap [java] Created connection to registry [java] Got registry service and query manager [java] Federation name: freebXMLRegistryFederation [java] Federation description: freebXML Registry Federation [java] Federation key id: urn:uuid:cb5039c1-85b2-4512-839a-893cb882c981 [java] Federation has no members [java] Cannot perform query |