Java Reference
In-Depth Information
In this application, the
PaymentEvent
and
PaymentHandler
classes are annotated
@Logged
, so all their methods are intercepted. In
PaymentBean
, only the
pay
and
reset
methods are annotated
@Logged
, so only those methods are intercepted.
Running the
billpayment
Example
You can use either NetBeans IDE or Ant to build, package, deploy, and run the
bill-
payment
application.
To Build, Package, and Deploy the
billpayment
Example Using NetBeans IDE
1. From the File menu, choose Open Project.
2. In the Open Project dialog, navigate to:
tut-install
/examples/cdi/
3. Select the
billpayment
folder
.
4. Select the Open as Main Project check box.
5. Click Open Project.
6. In the Projects tab, right-click the
billpayment
project and select Deploy.
To Build, Package, and Deploy the
billpayment
Example Using Ant
1. In a terminal window, go to:
tut-install
/examples/cdi/billpayment/
2. Type the following command:
ant
This command calls the
default
target, which builds and packages the applica-
tion into a WAR file,
billpayment.war
, located in the
dist
directory.
3. Type the following command:
ant deploy
To Run the
billpayment
Example
1. In a web browser, type the following URL:
http://localhost:8080/billpayment
The Bill Payment Options page opens.
2. Type a value in the Amount field.