Sept. 17, 2007, 6:54 a.m.
posted by hashspark
Exercise 11.3: Annotationless Stateless Session BeanThis exercise is a duplicate of Exercise 11.2, except that all annotations on the ProcessPayment EJB's bean and interface classes have been removed. All metadata is expressed in the ejb-jar.xml deployment descriptor. Start Up JBossIf you already have JBoss running, there is no reason to restart it. Otherwise, start it up as instructed in Workbook 1. Initialize the DatabaseThe database tables will be created when Exercise 11.3 is deployed to JBoss. If you have problems running this example, shut down JBoss and run the clean.db Ant task. Build and Deploy the Example ProgramsPerform the following steps:
As in the earlier exercises, titan.jar is rebuilt, copied to the JBoss deploy directory, and redeployed by the application server. Run the ClientRun the MakePayment application by invoking ant run.payment at the command prompt. Remember to set your JBOSS_HOME and PATH environment variables. This is the output:
run.payment:
[java] Making a payment using byCash( )..
[java] Making a payment using byCheck( )..
[java] Making a payment using byCredit( )..
[java] Making a payment using byCheck( ) with a low check number..
[java] The PaymentException has not been raised because the min check number
has been overridden in ejb-jar.xml
|
- Comment