My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
UsingProdEagleForJava  
Using ProdEagle for Java
Featured, Phase-Deploy
Updated Nov 2, 2011 by ed.go...@gmail.com

Introduction

This page provides basic instructions on adding the ProdEagle Java library to your Google App Engine applications, and using it to increment several counters.

Details

1. The library

You'll need to download the library - the latest version is in the downloads section or in the dist folder of the source.

2. Import the library into the project. You may also need the org.json.simple JSON library, which is not included. The version I used is called "json_simple-1.1.jar" at this link: http://code.google.com/p/json-simple/downloads/list (direct link here: http://code.google.com/p/json-simple/downloads/detail?name=json_simple-1.1.jar)

Your mileage may vary without versions.

3. Add a new entry to your web.xml, of the form:

<servlet>
<servlet-name>
HarvestHandler
</servlet-name>
<servlet-class>
com.prodeagle.java.servlets.HarvestHandler
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
HarvestHandler
</servlet-name>
<url-pattern>
/prodeagle/
</url-pattern>
</servlet-mapping>

4. Add counters to your application. Examples include:

Counter.increment("CounterA");

Counter.increment("CounterB", 5L);

BatchCounter batch = new BatchCounter();

batch.increment("CounterC");

batch.increment("CounterD", 100L);

batch.commit();

5. Once deployed, follow the instructions on the ProdEagle pages about registering your application.

Powered by Google Project Hosting