5.3. Running the SB Example

NoteNote
 

This example builds on the example in Section 2.2.2 Quick Start to the SB Example.

To run this example, you will have to first start the JOnAS server and then run the Java client. Finally, at the end of the execution you should stop the JOnAS server.

NoteNote
 

The following example assumes that the current directory is $JONAS_ROOT/examples/src/sb.

Here is how to proceed:

  1. As root, start the Red Hat Application Server server with the following command:

    /sbin/service jonas start
  2. Start the Java Client:
    jclient sb.ClientOp 

    A successful run should output:
    Create a bean
    Start a first transaction
    First request on the new bean
    Second request on the bean
    Commit the transaction
    Start a second transaction
    Rollback the transaction
    Request outside any transaction
    ClientOp OK. Exiting.

    Congratulations! You have succeeded running your first EJB application with JOnAS!

  3. Stop the JOnAS server:
    /sbin/service jonas stop