Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added more info

...

The following patch can be applied using a system or downloaded patch utility. (For example, you can get a patch utility for Windows from http://gnuwin32.sourceforge.net/packages/patch.htm.)

daytrader_geronimo.patch

Download this patch and go to the DayTrader/branches.2.1.3 directory to apply it. For example, with the patch utility mentioned above, you can type:

patch -p0 -i <path-to>/daytrader_geronimo.patch

After you have applied the patch, you can see the changes from JPQL to the Criteria API in the java class org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBBean. The changes are in the following 4 methods:

  • getMarketSummary()
  • getClosedOrders()
  • getAllQuotes()
  • getHoldings()

(Note: If you view these changes in eclipse, and you have previously run "mvn eclipse:eclipse" to setup eclipse projects, you'll have to run this command again in order for this file to compile.)

Run DayTrader on Geronimo

This writeup assumes some familiarity with Apache Geronimo. The download and documentation can be found at http://geronimo.apache.org.

Install and start the Geronimo serverFrom the Geronimo web console:

Add jpa2 plugins from repository http://geronimo.apache.org/plugins/openjpa2Image Added.