Tutorial 2: JMS Virtual Service Using DevTest Portal

This tutorial describes how to use a loan application virtual service via JMS using DevTest Portal. The DevTest Home\Projects\Cars v9 folder contains artifacts to demonstrate a virtual service to apply for a loan application with the Forward Cars application using JMS.
dts101
This tutorial describes how to use a loan application virtual service via JMS using DevTest Portal. The DevTest Home\Projects\Cars v9 folder contains artifacts to demonstrate a virtual service to apply for a loan application with the Forward Cars application using JMS.
2
Step 1 - Start DevTest Portal
Follow these steps:
  1. Ensure that the Enterprise Dashboard, registry, a coordinator server, and a simulator are running.
    • If your computer has DevTest Server installed:
    • Select
      DevTest Solutions
      ,
      Enterprise Dashboard Server
      from the list of programs in your Windows Start menu. Wait until the "Grails application running" message appears.
    • Select
      DevTest Solutions
      ,
      Registry
      from the list of programs in your Windows Start menu.
      If your computer has DevTest Workstation installed, use a registry that is running on another computer.
    • Select
      DevTest Solutions
      ,
      Coordinator Server
      from the list of programs in your Windows Start menu.
    • Select
      DevTest Solutions
      ,
      Simulator Server
      from the list of programs in your Windows Start menu.
  2. Select
    DevTest Solutions
    ,
    Portal
    UI
     from the list of programs in your Windows Start menu.
  3. Open a supported browser and enter .
    If the registry is on a remote computer, replace
    localhost
    with the name or IP address of the remote computer.
    If the port number was changed from the default value 
    1507
    , use the new port number.
  4. Click
    Log in
    .
    The
    Login
    dialog opens. Enter a valid username and password and click
    Login
    .
Step 2 - Start VSE
Follow this step:
  • Select
    DevTest Solutions
    ,
    Virtual Service Environment
    from the list of programs in your Windows Start menu.
    When the "Virtual service environment is now ready" line appears, VSE has initialized.
Step 3 - Copy JAR Files
Two JAR files are required for deploying the JMS-based virtual service and must be copied into the DevTest directory.
Follow these steps
:
  1.  Download the following files from the Internet.
    • activemq-client-5.12.1.jar
    • hawtbuf-1.11.jar
  2. Copy them to the following directory:
    DEVTEST_HOME
    \hotDeploy
Step 4 – Configure Forward Cars to Use Proxy JMS Queues
Follow these steps
:
  1. If Forward Cars is running, stop the application.
  2. Open
    DEVTEST_HOME
    \DemoServer\carsdemo \cars-loan.properties.
  3. Edit the following properties to point to the PROXY JMS destinations to enable recording and playback for a JMS service, as follows:
    cars.partner.responseQueue=PROXY.CARS.PARTNER.RESPONSE
    cars.partner.bofaRequestQueue=PROXY.CARS.PARTNER.BOFA
    cars.partner.chaseRequestQueue=PROXY.CARS.PARTNER.CHASE
    cars.partner.citiRequestQueue=PROXY.CARS.PARTNER.CITI
  4. Start Forward Cars from the command line. Go to the 
    DEVTEST_HOME\DemoServer\carsdemo
     directory and start the script for your operating system:
    • (Windows)
      start.bat
      If the Windows computer has UAC enabled (the default for Windows 7), the start script must run with Administrative privileges.
    • (UNIX or Linux) ./
      start.sh
    • (OS/X) 
      ./start.command
    The application can take several minutes to start.
  5. Enter the following URL in a web browser:
    /localhost:3434/cars-app
    The home page opens. Because Forward Cars uses port 3434, that port cannot be in use by any other application. If this port is not available, Forward Cars does not start successfully.
Step 5 - Deploy a Loan Application Virtual Service
Follow these steps:
  1. Navigate to
    DevTest
    Portal.
  2. In the
    Current Project
    drop-down on the upper right corner of the page, select
    Cars v9
    .
  3. From the left nav bar, select
    Manage, Virtual Service
    s.
  4. In the
    Actions
    column beside the 
    loan-offers
    virtual service, select the
    Options
    icon, then select
    Deploy
    .
    The
    Deploy Virtual Service
    window appears.
  5. Click
    Deploy
    .
Step 6 - Monitor the Virtual Service
Follow these steps:
  1. From the left nav bar, select
    Monitor, Virtual Service Environments, VSE
    .
    The Monitor Virtual Services window appears.
  2. You can see that the loan-offers virtual service is running on the PROXY JMS destinations that you specified in the cars-loan.properties file (Step 4).
Step 7 – Apply for a Loan Application in Forward Cars
Follow these steps
:
  1. Navigate to Forward Cars.
  2. From the home page, click
    Guest
    in the upper-right corner, then select
    Log In
    .
  3. In the
    Name
    field, enter
    lisa.simpson
    .
  4. In the
    Password
    field, enter
    golisa
    .
  5. Click
    Sign In
    .
    The home page opens.
  6. From the home page, click
    Loan Application
    .
    The Finance Application displays for Lisa Simpson.
  7. Click
    Apply
    .
    An Application Submitted message opens.
  8. Click
    OK
    .
Now, if you repeat step 6, you can see that the transaction count is going up, indicating that the virtual service is returning those loan responses.
Step 8 - Check on Your Loan Status
You can check the status of the loans you have submitted to see if they were approved.
Follow these steps
:
  1. From the home page, click
    Loan Status
    .
    The
    Application Results
    page opens.
  2. Click “Lisa” in the First Name field.
    The
    Application Results
    page refreshes to display the lender proposals.