Ejb3+Tutorial+3+-+Database+Configuration

persistence.xml
As we have seen with the previous EJB tutorials, the persistence.xml looks a little different for a JEE environment. Update the persistence.xml to resemble the following: code format="xml"   java:/HypersonicLocalServerDS    code
 * persistence.xml**

Data Source and Database
This persistence.xml makes use of a data source that we mentioned here. We're using this so that we have a database we can look at as we work through our tests to make sure we're cleaning everything up properly.


 * If you're working with a preconfigured system, the startdb.bat file mentioned below will already exist, you just need to run it.**

The files you downloaded already contained changes in support of the hypersonic local server data source definition. You'll still need to start hypersonic. To do so, you can do the following: code java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb code
 * 1) Change to the directory where you installed hsqldb (c:\libs\hsqldb)
 * 2) Make a new directory, called databases
 * 3) Change to that directory
 * 4) Start the database (requires you can execute a Java VM from the command line)