Personal tools
You are here: Home DiscoTect Installing and Running the PipeFilter Example
Document Actions

Installing and Running the PipeFilter Example

by Bradley Schmerl last modified 2005-11-17 05:04 PM

Describes how to install and run the PipeFilter example using Eclipse and DiscoTect

Preconditions:

  1. DiscoTect must be installed
  2. You should have Eclipse installed with the AJDT plugin
  3. You need to have a running instance of a J2EE server and configured with the right topics. See DiscoTect Installation & Setup for details.
  4. AcmeStudio installed with the Remote Control Plugin

Installing the example in Eclipse

  1. Unzip the PipeFilterExample zip file.
  2. In Eclipse, go to File>Import...
  3. Select "Exisiting Project into Workspace". Click {Next>}
  4. Browse to the location of the PipeFilter directory that was unzipped
  5. Select {Finish}

A new project called PipeFilter should appear in your Eclipse workspace. The icon on the folder on the root of this project should have a decoration saying AJ, indicating that the AspectJ builder is working.

Compiling the Project

Compilation of the PipeFilter example depends on having some external libraries installed.

  1. Right click on the PipeFilter project in the Navigator and select Properties.../Java Build Path.
  2. In the Libraries tab, select the Add External JAR.. button.
  3. Add the following jar files (which can be found in the DiscoTect distribution): DiscoTect.jar, jbossall-client.jar
  4. Make sure that the AspectJ runtime library is in your project.
  5. Rebuild your workpsace

Touring the Project

  • DiscoTect probes. The aspect definition of the probes for instrumenting this system are in the default package of this project in a file called "DiscoTectAspectProbe.aj". This contains an AspectJ definition to probe the desired methods in this example. This uses the JMSXMLEventEmitter provided by the DiscoTect package.
  • v1 Package. The v1 package contains the source code for the Pipe Filter example, into which will be weaved the DiscoTectAspectProbe.
  • test. This directory contains the DiscoSTEP specification, and contains the following interesting files:
    • PipeFilter.epp: The DiscoSTEP specification for mapping between the observed events and the PipeFilter architecture
    • PipeFilter.epo: The compiled version of PipeFilter.epp
    • *.xsd: Various XML Schema definition files used by DiscoSTEP to define events that PipeFilter.epp can understand.
  • AcmeStudio-PF. The project to be used by AcmeStudio to construct the architecture in.

Running the Example

  • Ensure that the J2EE Server is running
  • Run AcmeStudio, and once started:
    • Import the project into the workspace by: Going to File>Import..., select "Existing project into workspace", {Next>}, Browse to the location of AcmeStudio-PF, {Finish}
    • Start the Remote Control Server by:
      1. Selecting Window>Show View>Other...
      2. Select Remote Control View in the AcmeStuidio folder
      3. In the view that appears on the bottom part of AcmeStudio, select the JMS tab
      4. Enter in the details of the JMS server login. Keep the JMS Topic as AcmeStudioRemote
      5. Click {Start JMS Remote Control Listener}
      6. If "Connecting to JMS...done!" appears in the console part of the view, then AcmeStudio is now listening for architectural events on JMS.
  • Run the DiscoSTEP runner, and passing the PipeFilterXAcme.epo file as an argument. You can do this by typing dsr.srh PipeFilterXAcme.epo. (Note, you need to have compiled PipeFilterXAcme.epp with dsc.sh before running dsr.)
  • Run the RegSys class, making sure that it is the version with aspects weaved in (this should be done automatically if you're running it from within Eclipse). You must also make sure that the DiscoTect probe can find the right JMS implementation. To do this, you need to pass -Dj2eeImpl=jboss to the JVM when running. From Eclipse:
    1. Create a new run profile, with v1.RegSys as the main class. (Run>Run...) 2. In the Arguments tab of the run profile, enter -Dj2eeImpl=jboss in the VM arguments text field

What happens is that we have set up a tool chain that involves the instrumented RegSys program emitting XML events to the JMS bus (using the DiscoTectSystem topic). DiscoTect is listening to this bus (through the dsr runner), and receives each of these events as inputs. Using the mapping specified in the .epo file, it evaluates the rules against these events and emits architectural events to JMS (under the topic AcmeStudioRemote). The remote control plugin of AcmeStudio picks up these events and uses them to manipulate a model in AcmeStudio.

« January 2009 »
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: