-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Spring Roo 1.1 Cookbook
As of Spring Roo 1.1.3, both entity and persistence setup commands support the persistenceUnit argument which lets you create enterprise applications which interact with multiple databases. In this recipe we'll create two persistent units:
flight: the flight persistence unit consists of a single entity, Flight. It uses Hibernate as a JPA provider and maps to a MySQL database named "myFlightDB".
payment: the payment persistence unit consists of a single entity, Payment. It uses Hibernate as the JPA provider and maps to a MySQL database named "myPaymentDB".
Exit the Roo shell and delete the contents of the C:\roo-cookbook\ch02-recipes directory.
Start the Roo shell from the C:\roo-cookbook\ch02-recipes directory.
The following steps will demonstrate how to create an application that interacts with multiple databases:
Create the flight-app Roo project:
..roo> project --topLevelPackage sample.roo.flightapp...
Change the font size
Change margin width
Change background colour