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. It is availlable on the Speedo web site, http://speedo.objectweb.org. More recent versions can be found in the Speedo CVS repository.

The Speedo distribution

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

Running the Invoice example

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

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

  3. Configure the following properties about JDBC access by editing the etc/speedo-jdo.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