![]() |
![]() |
|
|
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.
$ 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:
The following optional parameters are interpreted by the client in the order in which they are listed:
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.
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|