Running the Example

The following steps describe how to start the PointBase database server and WebLogic Server, and run the sample client:

1.
Start PointBase server in a new command window as follows:

C:>cd styejbexamples
C:styejbexamples>setEnvWebLogic.bat
C:styejbexamples>startPointBase.bat
							

2.
Start WebLogic Server in a new command window as follows:

C:>cd styejbexamples
C:styejbexamples>setEnvWebLogic.bat
C:styejbexamples>startWebLogic.bat
							

3.
You can run the client in the same window you used to package the beans and build the client, using the following command:

C:styejbexamplesday12> runClientWebLogic.bat
							

The following steps describe how to start the JBoss server and run the sample client:

1.
Start the JBoss server in a new command window as follows:

C:>cd styejbexamples
C:styejbexamples>setEnvJBoss.bat
C:styejbexamples>startJBoss.bat
							

The JBoss server automatically starts the default HyperSonic database. So, there is no separate step for it.

2.
You can run the client in the same window you used to package the beans and build the client by using the following command:

C:styejbexamplesday12>runClientJBoss.bat
							

Running the client produces the following client-side output similar to the following:

Starting Client . . .
Looking up the order home via JNDI.
Created a new order:1028476929797 .
Adding some line items to the order.
Retrieving line items of the order.
Item id:1028476929918 Course id:1 Fee:200.0
Item id:1028476929958 Course id:2 Fee:300.0
Item id:1028476929988 Course id:3 Fee:300.0
Removing order:1028476929797 .

The corresponding output on the server side is as follows:

09:02:09,797 INFO  [STDOUT] Creating Order id:1028476929797
09:02:09,918 INFO  [STDOUT] Creating OrderLineItem id:1028476929918
09:02:09,958 INFO  [STDOUT] Creating OrderLineItem id:1028476929958
09:02:09,988 INFO  [STDOUT] Creating OrderLineItem id:1028476929988
09:02:10,068 INFO  [STDOUT] Removing Order id:1028476929797
09:02:10,088 INFO  [STDOUT] Removing OrderLineItem id:1028476929958
09:02:10,098 INFO  [STDOUT] Removing OrderLineItem id:1028476929918
09:02:10,098 INFO  [STDOUT] Removing OrderLineItem id:1028476929988

Notice the cascade removal of line items corresponding to the removal of their parent order.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.55.198