Setting Up the Enviroment

All the source code for our team on CVS. The CVSROOT for our team is
 CVSROOT=/afs/ece/usr/jhlee1/cvs/

 Other Requried Enviroment Variables

  #Java Runtime enviroment
  JAVA_HOME=/usr/local/j2sdk1.4.2_02

  #Local home for JBoss server.
  JBOSS_LOCAL_HOME=/afs/ece/usr/jhlee1/jboss-3.2.3

  #Dir where all the EJB jars will be placed by ant.
  JBOSS_DEPLOY_HOME=$JBOSS_LOCAL_HOME/server/vault/deploy

  ANT_HOME=$JBOSS_LOCAL_HOME/commonlibs/ant

  JBOSS_HOME=/afs/ece/class/ece749/ejb/jboss-3.2.3
  CVSROOT=/afs/ece/usr/jhlee1/cvs/

  PATH=$JAVA_HOME/bin:$JBOSS_LOCAL_HOME/bin:$JBOSS_HOME/bin:$ANT_HOME/bin:$PATH

  CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH
  CLASSPATH=$CLASSPATH:$ANT_HOME/lib/ant.jar
  CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jboss-j2ee.jar

 
  • All these enviroments variables are already set up in our .bash_profile that can be checked out from the following location /team1/enviroment/ in the CVS.
  • You can run the .bash_profile in your home directory to set up all the enviroment variables that are required by the ant script that builds and deploys all the beans to the server.
  • We are using a MySQL database running on msepc1.sp.cs.cmu.edu. All the configuration for this data source is already done. Make sure you have the JBOSS_DEPLOY_HOME enviroment variable correctly set.
  • Checking out, building and deploying the sources


    1. You need to checkout the module VaultProject from the CVS.
    2. Please use the tag BASELINE_V1 to checkout the sources. This will ensure that you get the right versions.
    3. Inside VaultProject we have a build file build.xml
    4. Run ant inside VaultProject
    5. Ant complies and builds all the EJBs and the supporting classes
    6. Ant also deploys all the sources to the $JBOSS_DEPLOY_HOME

    Starting the server

    Calling run.sh starts JBoss server. NOTE: run.sh is set in the PATH variable and it ensures that the JBoss server is started with the correct config directory.

    Running the client

    Once you server has started you need to do the following to start the Vault Client. Vault Client is an interactive command line client.
  • Edit VaultProject/jndi/jndi.properites so that the property java.naming.provider.url points to the machine name on which the which JBoss server instance is running.
  • Run the script VaultProject/runClient.sh to see the interactive Vault client.
  • Welcome to the Faultless Vault system!
    Main menu:
    [1] Add Customer
    [2] Edit Customer
    [3] Create Account
    [4] Deposit Amount
    [5] Withdraw Amount
    [6] Transfer Amount
    [7] Show Transaction History
    [Q] Quit