EJB Services

WSO2 WSAS 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 WSAS the location of the archive containing the remote/home interfaces, enter the details for the interface, and give the JNDI bean names. The WSO2 WSAS will take care of exposing the EJB as a Web service. The WSO2 WSAS 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. WSAS comes pre-configured with some of the settings for the following application servers: JBoss, Apache Geronimo, and BEA WebLogic. 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 home and remote interfaces for your EJB.
  8. Figure 2: Adding EJB Interface

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

  11. Select the interfaces that will be used as the remote and home interfaces. The Home Interface and Remote Interface fields 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.