Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Edit build.properties to point to the dependent libraries you have downloaded. The file contains the instructions as comments.

2.2

...

{{ $ ant compile}}

Compile with Ant

Compile the application. Compilation involves three separate compilation process. First the plain old javac compilation. Followed by GWT cross-compiler that translates Java code into JavaScript. And finally OpenJPA compilation that adds few bytecodes to the persistent classes to manage their persistent behavior (which is also known as bytecode enhancement).

$ ant compile

GWT Compiler takes will compile the source code, then compile it for GWT then compile it for OpenJPA. Compiling for GWT will take ages. Even though it only compiles for a single browser (FireFox).
This is controlled by the following directives in the module descriptor OpenTrader.gwt.xml

...

Once you have entered OpenTrader, the browser application looks like

In this page, you can place a trade offer to sell or buy some stocks. To really commit a trade you will need a matching offer. Now as a trader offer can only match to another trader's offer, you need to open another browser page with a different name. In FireFox, the tab will show the Trader name. Now if one Trader makes an offer that match another Trader's offer, then clicking the Sell or Buy button will commit the trade and will appear on the Trading History Window. Also notice the Server Log window. That will display SQL issued for every action by the server. You will also notice SQL being logged even if you are not pressing any buttons. Thatis because the Market Data Panel (the one in th etop-left corner) is refreshing the market prices for the Stocks by a periodic call to the server. As the stock prices change, that change is reflected on the gain/loss column of the waiting trade offers. All this dynamic partial update occurs in the same browser page – that is what GWT offers.