User:Ian Ogilvie

From Exchange Network Wiki

Jump to: navigation, search

Contents

About the Project

The Gulf of Maine Ocean Data Partnership ( GoMODP ) is developing a node to provide Gulf of Maine data providers a place to share their data. We have 8 initial participants ranging from Buoy data to Dead Birds to Trawl sampling. For more about the project see GoMODP Website.

The current format for this page is an informal diary of the projects progress. It's somewhat of a "how to" but many steps will be glossed over until someone asks for more specifics.


Technology

We are using Linux servers, Apache Tomcat and a PostgreSQL database. Needless to say this is a java implementation.


OpenNode2 Installation

Eclipse is our development platform and began by checking out a copy of the OpenNode2 project from google code. Checkout was done directly in eclipse via an Eclipse plugin for SVN.

http://opennode2.googlecode.com/svn/trunk/java

We followed the install instructions, creating the same directory structure for opennode2_home on both production and development (mac laptop).

We're using the same database (node2_prod) for development and production at the moment.

Note: this is for the nodes transaction database not a database which a flow might use.

OpenNode2/Wnos_Service/env/ecos-generic/jdbc.properties

Production system

jdbc.url=jdbc:postgresql://hornet.gomoos.org:5432/node2_prod

Development system

jdbc.url=jdbc:postgresql://localhost:6032/node2_prod


We used the ecos-generic configuration directories. To build the entire project...

Right click on OpenNode2/Resources/ant/build.xml and "Run As" Ant build.

output jar files are located in OpenNode2/Resources/dist/ecos-generic


Debugging

Modify the log4j.properties files (more than one) to enable debug messages in the log file.


webapps/wne2/WEB-INF/classes/log4j.properties

  1. log4j.appender.LOG.Threshold=INFO

log4j.appender.LOG.Threshold=ALL

Port forwarding ( to avoid asking for opened ports only for development ). This is a way to use a local database client against your remote database.

This forwards traffic from our database server listening on the default port of 5432 to your local machine as port 6032.

ssh webserver.gomoos.org -L 6032:databaseserver.gomoos.org:5432

For example you would start an ssh session with a command similar to the one above and then your local OpenNode2 would use this for a connection string to the database server.

jdbc.url=jdbc:postgresql://localhost:6032/node2_prod

Port 5432 on the database server has been forwarded through ssh to port 6032 on your local machine.

You can use a similar trick to debug with Eclipse. Start Eclipse in the debug mode using JPDA

apache-tomcat/bin/catalina.sh jpda start

Forward the webservers port 8000 ( the default port for the java debugger ) to your local machine (again port 8000.

ssh webserver.gomoos.org -L 8000:webserver.gomoos.org:8000

point at this using Eclipse.

Note: I routinely have to stop and start tomcat (./catalina.sh stop) to make this work a second time.

To sync up the debugger with Eclipse for single stepping through code and adding break point, so far, I've had to checkout the individual parts of OpenNode2 as projects.

So for example to debug the Node 2 Endpoint I would need to set up a project (check out from SVN) for http://opennode2.googlecode.com/svn/trunk/java/Endpoint2, and use that project to set breakpoints and single step through code.


Contacts


PI and Project Manager : Deb Soule
Technical Project Manager Riley Young Morse
Lead Developer: Ian Ogilvie





Personal tools