Sun GlassFish Web Space Server 10.0 Developer's Guide

ProcedureGenerating Services

  1. From the service.xml GUI editor, click the Generate Services tab.

    You can see the creation of classes, services, and data models that are required for database interaction.

  2. In the GUI editor, click the Local Methods tab and click Go To Source.

    The local service file for the Movie entity appears.

  3. In the local service class file, add a method called getMovies to return the movies listed in the Movie entity.

    You can use the moviePersistance.findAll method to find the movies present in the Movie entity.

  4. Save the class file.

    In the GUI editor, you can see the getMovies method under the Local Methods tab.

  5. Click Generate Services.

    You can see that all the services are generated again.