JOnAS Tutorial | ||
---|---|---|
<<< Previous | Entity Beans | Next >>> |
To do a complete and clean run of this example, you will have to first start the JOnAS server and then run the two Java clients. Finally, at the end of the execution you might want to stop the JOnAS server.
NOTE: The following example assumes that the current folder is $JONAS_ROOT/examples/src/eb.
Here is how to proceed:
Start the JOnAS server:
jonas start |
Load the eb.jar if you have not added 'eb.jar' in the ejb service descriptors list in the jonas.properties file.
jonas admin -a eb.jar |
JONAS_BASE is set to C:\jonas-3-1 2003-06-30 09:30:54,702 JContainer.addBean : AccountImpl available 2003-06-30 09:30:54,982 JContainer.addBean : AccountExpl available |
Start the two Java Clients:
jclient eb.ClientAccount AccountImplHome jclient eb.ClientAccount AccountExplHome |
A successful run should output:
Getting a UserTransaction object from JNDI Connecting to the AccountHome Getting the list of existing accounts in database 101 Antoine de St Exupery 200.0 102 alexandre dumas fils 100.0 103 conan doyle 500.0 104 alfred de musset 100.0 105 phileas lebegue 350.0 106 alphonse de lamartine 650.0 Creating a new Account in database Finding an Account by its number in database Starting a first transaction, that will be committed Starting a second transaction, that will be rolled back Getting the new list of accounts in database 101 Antoine de St Exupery 200.0 102 alexandre dumas fils 300.0 103 conan doyle 500.0 104 alfred de musset 100.0 105 phileas lebegue 350.0 106 alphonse de lamartine 650.0 109 John Smith 100.0 Removing Account previously created in database ClientAccount terminated |
Stop the JOnAS server with the following command:
jonas stop |
<<< Previous |
Home
Up | Next >>> |