Building and Deploying the Sample Plug-in

The following procedure describes how to build and deploy the sample payme-insight-plugin plug-in from the Spring Insight Developer Kit. In the procedure, it is assumed that:

  1. Build the sample plug-in from the Spring Insight Developer Kit using Maven:

    $ cd ~/dev/insight-dev/vfabric-insight-developer-kit-1.0.X.X/samples/payme-insight-plugin
    $ mvn clean package

    The build creates and packages the plug-in into a JAR file in the target child directory of payme-insight-plugin.

  2. Copy the plug-in JAR file into the insight/collection-plugins directory of the Spring Insight-enabled tc Runtime instance insight-instance:

    $ cp target/payme-insight-plugin-version.jar \
         /home/s2/vfabric-tc-server-developer-2.5.X.X/insight-instance/insight/collection-plugins

    Note: For clarity, the preceding command is shown on two lines, but you should execute it all on one line.

  3. Build the sample web application that is included with the payme plug-in:

    $ cd ~/dev/insight-dev/samples/payme-webapp
    $ mvn clean package
  4. Deploy the resulting WAR by copying it from the target directory to the webapps directory of the tc Runtime instance:

    $ cp target/payme-webapp.war  /home/s2/vfabric-tc-server-developer-2.5.X.X/insight-instance/webapps
  5. Start (or restart if it is already running) the tc Runtime instance to activate the plug-in. For example:

    $ cd /home/s2/vfabric-tc-server-developer-2.5.X.X
    $ ./tcruntime-ctl.sh insight-instance start
  6. Using your browser, navigate to the Spring Insight dashboard (http://localhost:8080/insight.)

    In a new browser, open http://localhost:8080/payme-webapp, which is the URL for the payme-webapp. Reload the screen a few times to create some activity that Spring Insight will track.

    Back on the Spring Insight dashboard, you will see traces for each Web request to payme-webapp.

  7. Select the Recent Activity tab, then select the payme-webapp from the Applications pull-down list.

  8. Select any column in the Trace History timeline at the top of the page.

    A trace loads at the bottom of the page that shows the CashMoneyOperation. A screen similar to the following indicates that the plug-in is working correctly.