BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Using BEA Jolt with BEA WebLogic Server   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


Run the Servlet with JavaBean Example

When WebLogic Server is started in the default \config\mydomain directory, the EJBean example is automatically deployed in the \applications directory.

  1. Start the WebLogic Server in the \config\mydomain directory. You can check that the EJBean has been deployed correctly either by checking the server command-line window, or by opening the Console and examining EJB under Deployments. You should see ejb.jolt.bankapp deployed and should be able to monitor its activity.

  2. Open a separate command-line window, and then run the client by entering the following command:
    $ java examples.jolt.ejb.bankapp.Client

    If you are not running the WebLogic Server with its default settings, you will have to use the following command line:

    $ java examples.jolt.ejb.bankapp.Client "t3://WebLogicURL:Port"

    where the following parameters are defined as follows:

  3. If you are running the Client example, you should get output that is similar to the following from the client application:
    4.	Beginning jolt.bankapp.Client...
    5.
    6. Created teller Terry
    7.
    8. Getting current balance of Account 10000 for Erin
    9. Balance: 27924.02
    10.
    11. Start Transaction 1 for Erin
    12.
    13. Depositing 100.0 for Erin
    14. Balance: 28024.02
    15.
    16. End Transaction 1 for Erin
    17.
    18. Start Transaction 2 for Erin
    19.
    20. Depositing 200.0 for Erin
    21. Balance: 28224.02
    22.
    23. Withdrawing 28324.02 for Erin
    24. Transaction error:
    25. examples.jolt.ejb.bankapp.TransactionErrorException: Teller error: application
    26. exception:
    27. Account Overdraft
    28.
    29. Rolling back transaction for Erin
    30.
    31. End Transaction 2 for Erin
    32.
    33. Getting final balance of Account 10000 for Erin
    34. Balance: 28024.02
    35.
    36. Removing teller Terry
    37.
    End jolt.bankapp.Client...

    Note: Note how the final balance shows that Transaction 2 was rolled back to the balance at the end of Transaction 1.

You can read more about EJBs in the Programming WebLogic Enterprise JavaBeans guide. To learn more about using BEA Jolt, refer to the Using BEA Jolt guide.

 

back to top previous page