Service Registry 3 2005Q4 Developer's Guide

Using Federated Queries: Example

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).

The declarative query is the query that is performed in Using Declarative Queries: Example. The stored query is the FindAllMyObjects query. Because this example does not authenticate the user, the user that makes the query is RegistryGuest. The user RegistryGuest owns only one object, itself. Therefore, the FindAllMyObjects query returns only one result, the user RegistryGuest.

ProcedureTo Run the JAXRQueryFederationExample

Steps
  1. Go to the directory <INSTALL>/registry/samples/query-federation.

  2. Type the following command:


    asant run