Address Book EJB setup

Configuring this project takes approximately 5 minutes.

The following steps show you how to import, run, and explore the sample:
  1. Before you can configure the sample, you must first import it into your workspace.
    1. Import the sample.
    2. In the Import Project dialog box, accept the defaults and click Finish.
  2. To run the program:
    1. Expand the AddressBookEJB > Deployment Descriptor: AddressBookEJB > Entity Beans directories. Right-click the AddressBook bean, and select Run As > Run on Server. To select a server:
      • Click Choose an existing server and select a server.
      • If there is no existing server, click Manually define a new server and select a server. Click Next and accept the defaults.
    2. Click Next, and check to make sure that AddressBookEJBEAR is listed under Configured projects. Click Finish.
    3. Once the server is running, and the Universal Test Client window has opened, click on the JNDI Explorer link on the left. If a Universal Test Client window does not open, in the Servers view, right-click the server and select Run universal test client.
    4. Expand the ejb > ejbs directories, and click on AddressBookHome.
    5. AddressBookHome will appear under EJB Beans on the left of the screen. Click on the plus sign next to AddressBookHome to expand.
    6. A Create method will be listed underneath AddressBookHome. Click on it to bring it up in the Universal Test Client window on the right of the screen.
    7. Click Invoke, and then click Work with Object. AddressBook will appear under AddressBookHome. Expanding that menu will display the different methods that you can work with.
  3. To explore the sample:
    1. Expand the AddressBookEJB project.
    2. Expand the ejbModule directory, and the ejbs package.
    3. Double-click on AddressBookBean.java to view the code.
Parent topic: Address Book EJB

Feedback