Getting started with Speedo

  1. Where to find Speedo ?
  2. The Speedo distribution
  3. Running the Invoice example

Back to the Speedo documentation


Where to find Speedo ?

Speedo is an objectweb product. Then it is availlable on its web site http://speedo.objectweb.org. More recent versions can b availlable on the CVS repository.

The Speedo distribution

The Speedo distribution contains the following files or directories:
  • doc: It contains the speedo documentation
  • etc: It contains the speedo configuration files (see the user manual for more details
  • examples: It contains the speedo examples
  • lib: It contains the libraries which composes the Speedo. All these libraries can be merged in a single speedo.jar through the build.xml. It contains in addition some jdbc drivers and the log4j implementation(open source logging system).
  • build.xml: permit to build the jar and rar files with the librairies (lib) and the configuration file (etc).
  • speedo_for_jonas_ra.rar: is a speedo rar (JCA connector) for the use of Speedo into the JOnAS application server. In fact this rar file is not provided directly in the Speedo distribution. The rar can be built by using the build.xml provided
  • speedo.jar: is the speedo library. It does not contains a JDBC drivers (required), neither a logging implementation(optionnal). In fact this jar file is not provided directly in the Speedo distribution. The jar can be built by using the build.xml provided
  • speedo_for_jonas_ra.rar: is a speedo rar (JCA connector) for the use of Speedo into application servers. In fact this rar file is not provided directly in the Speedo distribution. The rar can be built by using the build.xml provided
  • src.zip: A zip of the Speedo sources.

Running the Invoice example

  1. In the etc/speedo.properties (Speedo configuration file), in the user manual.

  2. Build the speedo.jar file by using the build.xml provided at the root of the distribution.

  3. Configure the following properties about the JDBC access by editing the etc/speedo.properties file.
  4. To compile and enhance the example, run the target 'generation' of the build.xml provided with the invoice example:
    ant generation
    Buildfile: build.xml
    
    generation:
    
    clean:
       [delete] Deleting directory /home/smith/speedo/examples/invoice/build
        [mkdir] Created dir: /home/smith/speedo/examples/invoice/build
        [javac] Compiling 7 source files to /home/smith/speedo/examples/invoice/build
       [speedo] Remove the specified persistent classes from the directory /home/smith/speedo/examples/invoice/build
       [speedo] Remove the jmi files from the directory /home/smith/speedo/examples/invoice/build
       [speedo] [INFO] Loading jdo files...
       [speedo] [INFO] Completing meta data...
       [speedo] [INFO] Generating Jorm files...
       [speedo] [INFO] Generating Java files...
       [speedo] [INFO] Compiling Java files...
       [speedo] [INFO] Enhancing Persistent classes...
       [speedo] [INFO] Enhancing Persistent aware classes...
       [speedo] [INFO] Done.
    
    BUILD SUCCESSFUL
    Total time: 15 seconds

  5. To run the example, run the targets 'create remove' of the build.xml provided with the invoice example:
    ant create remove
         [java] Creating the addresses...
         [java] Creating the products...
         [java] Creating the invoice...
         [java] number:217 / address: (name:Seb /street:edelweiss /zip:38610 /town:Gieres /country:France) / productUnits:
         [java]     [(identifier:0 / quantity:20 / product: (name:sweat-shirt_blue_L / size:L / color:blue / weight:300.0 / price:30.0)),
         [java]     (identifier:1 / quantity:20 / product: (name:short_blue_L / size:L / color:blue / weight:100.0 / price:10.0)),
         [java]     (identifier:2 / quantity:20 / product: (name:t-shirt_blue_L / size:L / color:blue / weight:200.0 / price:15.0))]
         [java] Data base:
         [java] ==========
         [java] Product (name:short_black_L / size:L / color:black / weight:100.0 / price:10.0)
         [java] Product (name:short_black_M / size:M / color:black / weight:100.0 / price:10.0)
         [java] Product (name:short_black_S / size:S / color:black / weight:100.0 / price:10.0)
         [java] Product (name:short_blue_L / size:L / color:blue / weight:100.0 / price:10.0)
         [java] Product (name:short_blue_M / size:M / color:blue / weight:100.0 / price:10.0)
         [java] Product (name:short_blue_S / size:S / color:blue / weight:100.0 / price:10.0)
         [java] Product (name:short_red_L / size:L / color:red / weight:100.0 / price:10.0)
         [java] Product (name:short_red_M / size:M / color:red / weight:100.0 / price:10.0)
         [java] Product (name:short_red_S / size:S / color:red / weight:100.0 / price:10.0)
         [java] Product (name:short_white_L / size:L / color:white / weight:100.0 / price:10.0)
         [java] Product (name:short_white_M / size:M / color:white / weight:100.0 / price:10.0)
         [java] Product (name:short_white_S / size:S / color:white / weight:100.0 / price:10.0)
         [java] Product (name:short_yellow_L / size:L / color:yellow / weight:100.0 / price:10.0)
         [java] Product (name:short_yellow_M / size:M / color:yellow / weight:100.0 / price:10.0)
         [java] Product (name:short_yellow_S / size:S / color:yellow / weight:100.0 / price:10.0)
         [java] Product (name:sweat-shirt_black_L / size:L / color:black / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_black_M / size:M / color:black / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_black_S / size:S / color:black / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_blue_L / size:L / color:blue / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_blue_M / size:M / color:blue / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_blue_S / size:S / color:blue / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_red_L / size:L / color:red / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_red_M / size:M / color:red / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_red_S / size:S / color:red / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_white_L / size:L / color:white / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_white_M / size:M / color:white / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_white_S / size:S / color:white / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_yellow_L / size:L / color:yellow / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_yellow_M / size:M / color:yellow / weight:300.0 / price:30.0)
         [java] Product (name:sweat-shirt_yellow_S / size:S / color:yellow / weight:300.0 / price:30.0)
         [java] Product (name:t-shirt_black_L / size:L / color:black / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_black_M / size:M / color:black / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_black_S / size:S / color:black / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_blue_L / size:L / color:blue / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_blue_M / size:M / color:blue / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_blue_S / size:S / color:blue / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_red_L / size:L / color:red / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_red_M / size:M / color:red / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_red_S / size:S / color:red / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_white_L / size:L / color:white / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_white_M / size:M / color:white / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_white_S / size:S / color:white / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_yellow_L / size:L / color:yellow / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_yellow_M / size:M / color:yellow / weight:200.0 / price:15.0)
         [java] Product (name:t-shirt_yellow_S / size:S / color:yellow / weight:200.0 / price:15.0)
         [java] There is 45 products.
         [java] Address (name:Alex /street:? /zip:38000 /town:Grenoble /country:France)
         [java] Address (name:Pascal /street:? /zip:38000 /town:Saint Ismier /country:France)
         [java] Address (name:Seb /street:edelweiss /zip:38610 /town:Gieres /country:France)
         [java] Address (name:Bruno /street:? /zip:750XX /town:Paris /country:France)
         [java] There is 4 addresses.
         [java] Invoice (number:217 / address: (name:Seb /street:edelweiss /zip:38610 /town:Gieres /country:France) / productUnits:
         [java]     [(identifier:0 / quantity:20 / product: (name:sweat-shirt_blue_L / size:L / color:blue / weight:300.0 / price:30.0)),
         [java]     (identifier:1 / quantity:20 / product: (name:short_blue_L / size:L / color:blue / weight:100.0 / price:10.0)),
         [java]     (identifier:2 / quantity:20 / product: (name:t-shirt_blue_L / size:L / color:blue / weight:200.0 / price:15.0))])
         [java] There is 1 invoices.
    
    remove:
         [java] Removing the invoice...
         [java] remove : identifier:2 / quantity:20 / product: (name:t-shirt_blue_L / size:L / color:blue / weight:200.0 / price:15.0)
         [java] remove : identifier:1 / quantity:20 / product: (name:short_blue_L / size:L / color:blue / weight:100.0 / price:10.0)
         [java] remove : identifier:0 / quantity:20 / product: (name:sweat-shirt_blue_L / size:L / color:blue / weight:300.0 / price:30.0)
         [java] Removing the products...
         [java] Removing the addresses...
         [java] Data base:
         [java] ==========
         [java] There is 0 products.
         [java] There is 0 addresses.
         [java] There is 0 invoices.
    
    BUILD SUCCESSFUL
    Total time: 10 seconds