EJB Services

WSO2 Application Server has the ability to expose Enterprise Java Beans (EJB) as Web services. Once you have the EJB deployed in your application server, all you have to do is give the WSO2 Application Server the location of the archive containing the remote interface, enter the details for the interface, and give the JNDI bean names. The WSO2 Application Server will take care of exposing the EJB as a Web service. The WSO2 Application Server will communicate with the EJB using JNDI, which the WS client sees as just another Web service.

Deploying EJB Services

  1. In the navigator, under Manage/Service, click EJB Services. The EJB Services page appears.
  2. Select Use Existing or Add New, to use an existing application server or to configure a new application server respectively.

Adding a New Server

  1. If you selected Add New, select your server from the Server Type list. WSO2 Application Server comes pre-configured with some of the settings for the following application servers: JBoss, Apache Geronimo, BEA WebLogic, etc. If you use an application server other than those available in the list,select Generic. Refer to your application server documentation/configuration for the values and the field descriptions.
  2. Enter values for the Provider URI and JNDI Context Class fields.
  3. Figure 1: Application Server Configuration

  4. Enter a user name and password for the application server.
  5. Click Add Application Server . If the configuration details were entered correctly, you should see the server you configured in the Use Existing list.
  6. You can enter other application server configurations if you want. Otherwise, click Next .
  7. Click Browse to locate the file containing the remote interface for your EJB.
  8. Figure 2: Adding EJB Interface

  9. Click Next. The EJB remote interface that you selected in the previous step appear on this page.
  10. Figure 3: Selecting Interfaces

  11. Select the interface that will be used as the remote interface. The Remote Interface field in the EJB details table will be populated automatically.
  12. Enter the JNDI Bean Name for your EJB.
  13. Click Deploy Service. If the service deployment was successful, you will see the EJB service you just exposed on the Service List page.