EOB 1.1
About EOB
Overview
News & History
Downloads
Persistence
Development
J2EE comparison
Requirements
Bugs & Issues
Limitations of use
Info & Credits
Enterprise Object Broker |
|
Example 3 - ForumDemo
(from Apache's Velocity project)
Description
This app shows a discussion forum. It uses Velocity for the
presentation, with the ForumDatabase and Messages being hosted in the
EOB server. They are persisted using Hibernate from SourceForge.
The webserver happens to be in the same VM as the bean server,
but that is not mandatory. AltRMI with allow lookup from any
TCP/IP visible location.
Screenshot of the Velocitywebapp . URL : http://localhost:8080/forumdemo |
Also included with example3 is an object model viewing
application courtesy of the araSpect
project at SourceForge
http://localhost:8080/forumdemo/araspect.jsp
Screenshot:
Beanshell
is a very cool Shell environment for Java..
You can launch the beanshell application from the command line.
java -jar example3-beanshell.jar
Alternatively you may test it va the built-in applet. Point your browser to:
http://localhost:8080/forumdemo/beanshell.html
(if you have launched the server yourself)
http://demo.enterpriseobjectbroker.org:8080/forumdemo/beanshell.html
(demo server)
Screenshot:
1) Get Phoenix from downloads (unless you have it already). See section titled 'Phoenix in binary form' on the downloads page. Unzip Phoenix
2) Download eob-with-http-and-db.sar from the downloads page. Place the sar file in the 'apps' directory of the unzipped Phoenix.
3) CD to the bin directory and execute
run.bat or run.sh as appropriate. Phoenix will start EOB, but will exit
quickly as there are no apps to host.
4) Download* eob-example3.eob and place it in the 'startupApps'
directory created a couple of dirs deeper than the phoenix 'apps' dir.
* - Or make this .eob file from the source download by doing 'ant eob'
5) Execute run.bat or run.sh again. You should see....
Phoenix 4.0.3
CREATE TABLE MESSAGE( ID BIGINT NOT NULL PRIMARY KEY ,CONTENTS LONGVARCHAR,EMAIL LONGVARCHAR,NAME LONGVARCHAR,parent BIGINT,SUBJECT LONGVARCHAR,SUBMITTED DATE)
Mounted EOB application eob-example3 (dir /home/eob/phoenix-bin/apps/eob-with-http-and-db/work/eob-example3)
deploying context=forumdemo, webapp=file:/home/eob/phoenix-bin/apps/eob-with-http-and-db/work/eob-example3/webapps/forumdemo
.war to host=localhost
..mounted WAR application - contextPath=forumdemo, webAppDirOrWarFile=/home/eob/phoenix-bin/apps/eob-with-http-and-db/work/eob-example3/webapps/forumdemo.war
Hypersonic SQL listening on port 9001
server.properties not found, using command line or default properties
6) Point your browser to http://localhost:8080/forumdemo to see and interact with the demo.
7) Point your browser at http://localhost:8080/forumdemo/Inspect.jsp to browse the client side representation of the object model using araSpect
8) Launch a mainable test with java -jar example3-test.jar (get it from the downloads page)
9) From the downloads page, get and launch the beanshell environment with java -jar example3-beanshell.jar (see the screenshot above for commands)
- The EOB Team
$Revision: 1.19 $ $Date: 2003/04/15 21:24:13 $