Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add some instructions on initializing the db by hand.

...

Create a new datasource using the admin console database wizard, selecting the derby-embed-xa type and naming the database "SampleDatabase" and the datasource "SampleTxDatasource". The admin console will come up with a module Id different from what the samples need, so you have to map them in var/config/artifact_aliases.properties. Insert a line like this:

...

replacing 2.2-SNAPSHOT with the appropriate sample version and adjusting the right hand side as necessary. Be sure geronimo is stopped when you edit artifact_aliases.properties.

Manually initializing the database.

Samples that need database connectivity have the database initialized by default by using a DBInitializationGBean to run an sql script. Alternatively here we describe how to initialize the database by hand.

...

In a production scenario most likely your db will be set up by a DBA rather than either of these methods.

  1. Remove the DBInitializationGBean from the sample plan
  2. In the console DB Manager page, use the Create DB function to create a database named SampleDatabase.
  3. In the console DB Manager page select the SampleDatabase in Use DB, paste the script found in the sql file located in the project (ear or war) that builds the top level javaee artifact into the text box, and run it.
  4. Deploy and run the application using the modified plan.

Sample applications available

...