Running xPetstore
Running xPetstore

  1. Start the application server
    • For JBoss, run the following commands:
      • cd JBOSS_HOME/bin
      • ./run.sh -c xpetstore
    • For WebLogic, run the following commands:
      • cd WL_HOME/../user_projects/xpetstore
      • ./startWebLogic.sh
    • For Orion, run the following commands:
      • cd ORION_HOME
      • java -jar orion.jar
        Note: The first time you run the Orion, you may have errorrs because the xpetstore application are not registered. No worry, as soon as you're going to deploy them, it will resolve this issue.
    • For Tomcat, run the following commands:
      • cd TOMCAT_HOME/bin
      • ./startup.sh
  2. Select the Application Server
    • Edit the file XPETSTORE_HOME/conf/as/appserver.properties and set the property app.server. You may want to review XPETSTORE_HOME/conf/as/<app.server>.properties to make sure that all the properties are properly set.
  3. Select the Database
    • Edit the file XPETSTORE_HOME/conf/db/database.properties and set the property db.name
    • Edit the file XPETSTORE_HOME/conf/db/<db.name>.properties to configure the database.
      You must set the following properties:
      • db.driver
      • db.url
      • db.user
      • db.password
      • db.classpath
      PS: Don't change the hibernate properties.
  4. Build the source code
    • cd XPETSTORE_HOME/xpetstore-implementation
    • ./build.sh
      This command will :
      • Generate Java code in XPETSTORE_HOME/xpetstore-implementation/build/java
      • Generate the deployment descriptors at XPETSTORE_HOME/xpetstore-implementation/build/META-INF and XPETSTORE_HOME/xpetstore-implementation/build/WEB-INF
      • Compile the source code and build .jar, .war and .ear files at XPETSTORE_HOME/dist
  5. Test the application (for xpetstore-ejb only)
    • ./build.sh test
      This run all the test cases and generate a report at XPETSTORE_HOME/xpetstore-implementation/build/junit/index.html
  6. Deploy the application
    • ./build.sh deploy
  7. Initialize the database
    • ./build.sh db
  8. Run the application