JOnAS v2.4 Tutorial | ||
---|---|---|
<<< Previous | Session Beans | Next >>> |
To do a complete and clean run of this example, you will have to first start the EJB server and then run the Java client. Finally, at the end of the execution you might want to stop the EJB server. Here is how to proceed:
Start the EJB server:
Unix platforms open a new terminal and proceed as follows:
bash> cd $JONAS_ROOT/example/src/sb bash> EJBServer |
Windows platforms open a new console window and proceed as follows:
C:> cd %JONAS_ROOT%/example/src/sb C:> EJBServer |
JOnAS should display something like this:
JOnAS Server, version 2.4.3, running on RMI. EJB container : AccountExpl available Done |
Start the Java Client:
Unix platforms open a new terminal and proceed as follows:
bash> cd $JONAS_ROOT/example/src/sb bash> . $JONAS_ROOT/config/bin/unix/config_env bash> java sb.ClientOp |
Windows platforms open a new console window and proceed as follows:
C:> cd %JONAS_ROOT%/example/src/sb C:> config_env C:> java 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 to run you first EJB application with JOnAS !
Stop the EJB server with the following command:
JonasAdmin -s |
<<< Previous | Home | Next >>> |
Building the example | Up | Understanding Session Beans |