Development and running it¶
Check out the project from svn, using anonymous checkout. Use Svn path svn://activequant.org/opt/repositories/aq-webgui , checkout trunk.
Edit the hibernate database properties file ( ./src/main/resources/hibernate.cfg.xml ) and update the mysql settings in there. Tables will be created automatically by hibernate when the initial database exists. My hibernate.cfg.xml looks like this:
<hibernate-configuration>
<session-factory>
<!-- # settings # -->
<property name="connection.url">jdbc:mysql://localhost/activequant</property>
<property name="connection.username">AQ_DBUSER</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.password">AQ_DBPWD</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="current_session_context_class">thread</property>
<!-- # mapping files # -->
...
When done, dive into the trunk folder and navigate to the folder containing the pom.
Then start a simple development server (jetty) with maven :mvn -Djetty.port=9999 jetty:run
You can specify the jetty port as shown above.
This looks like this:ustaudinger@activequant:~/work/aq-webgui/trunk/aq-webui$ ls -la total 40 drwxr-xr-x 6 ustaudinger ustaudinger 4096 2009-04-04 17:00 . drwxr-xr-x 4 ustaudinger ustaudinger 4096 2009-02-08 08:12 .. -rw-r--r-- 1 ustaudinger ustaudinger 397 2009-04-04 14:14 .classpath -rw-r--r-- 1 ustaudinger ustaudinger 5250 2009-04-04 14:16 pom.xml -rw-r--r-- 1 ustaudinger ustaudinger 562 2009-04-04 14:14 .project drwxr-xr-x 3 ustaudinger ustaudinger 4096 2009-04-04 14:14 .settings drwxr-xr-x 5 ustaudinger ustaudinger 4096 2009-02-08 08:12 src drwxr-xr-x 6 ustaudinger ustaudinger 4096 2009-04-04 16:37 .svn drwxr-xr-x 3 ustaudinger ustaudinger 4096 2009-04-04 17:00 target ustaudinger@activequant:~/work/aq-webgui/trunk/aq-webui$ pwd /home/ustaudinger/work/aq-webgui/trunk/aq-webui ustaudinger@activequant:~/work/aq-webgui/trunk/aq-webui$ mvn -Djetty.port=9999 jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. ...
Then open a webbrowser and navigate to http://localhost:9999/
Feature list¶
Features / done:- view amount of ticks and candles in the database
- possibility to change the data in the hashmap in the instrument specification
- Deploy it on this test server .... ( http://activequant.org/aq-webui-1.0-SNAPSHOT )
- possibility to add transactions to an account
- viewing of transactions
- viewing of subaccounts
- viewing of balance book
- viewing of equity curve resulting from transactions
- possibility to view simulation configurations
- report viewers of a simulation
Development notes¶
Project setup procedure, as outlined on http://struts.apache.org/2.0.6/docs/struts-maven-archetypes.html, but with slight modification due to updates ... :mvn archetype:create -DgroupId=org.activequant.webui \ -DartifactId=aq-webui \ -DarchetypeGroupId=org.apache.struts \ -DarchetypeArtifactId=struts2-archetype-starter \ -DarchetypeVersion=2.0.11.2