Scaffolding GWT applications from JPA entities
In this recipe, we'll look at the gwt
setup
command, which scaffolds GWT artifacts from JPA entities.
Getting ready
Create a new directory (C:\roo-cookbook\ch05-gwt
) in your system. Copy the ch05_gwt_app.roo
script that accompanies this book to the ch05-gwt
directory. Start the Roo shell from the ch05-gwt
directory and execute the ch05_gwt_app.roo
script using the script
command. Executing the ch05_gwt_app.roo
script does the following:
Creates a
flightapp-gwt
Eclipse projectSets up Hibernate as a persistence provider
Configures MySQL as the database for the application
Creates
Flight
andFlightDescription
JPA entities and defines a many-to-one relationship betweenFlight
andFlightDescription
entities
If you are using a different database than MySQL or your connection settings are different from what is specified in the script, then modify the script accordingly.
Install the Google Plugin for Eclipse IDE (http://code.google.com/eclipse/); it simplifies...