Java Reference
In-Depth Information
ant setup
13. In NetBeans IDE, in the Projects tab, right-click the
mailconnector-ear
project and select Deploy.
To Build, Package, and Deploy the
mailconnector
Example Using Ant
1. In a terminal window, go to:
tut-install
/examples/connectors/mailconnector/
mailconnector-ear/
2. Enter the following command:
ant all
This command builds and deploys the
mailconnector-ra
RAR file, sets up
users and resources, then builds and deploys the
mailconnector-ear
EAR
file. It also places identical files named
mailconnector.rar
and
mailcon-
nector.jar
in the
mailconnector
directory.
To Run the
mailconnector
Example
1. In a web browser, navigate to the following URL:
http://localhost:8080/mailconnector-war/
2. Log in with a user name of either
user1
,
user2
,
user3
, or
user4
. The
password is the same as the user name.
You can send messages and browse for the messages you sent. The messages you
sent are available 30 seconds after you sent them.
For example, you can log in as
user1
and send a message to
user4
, then log in
as
user4
and query for messages. In the form for browsing messages, verify that
the fields are correct, then click Browse.
View the server log to follow the flow of the application. Most classes and methods
specify logging information that makes the sequence of events easy to follow.
3. Before you undeploy the application, in a terminal window, navigate to
tut-in-
stall
/examples/connectors/mailconnector/mailconnector-
ear/
and enter the following command to remove the resources and users:
ant takedown
You cannot undeploy the resource adapter until you run this command.