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
- In the navigator, under Manage/Service, click EJB
Services. The EJB Services page
appears.
- Select Use Existing or Add New, to
use an existing application server or to configure a new application
server respectively.
Adding a New Server
- 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.
- Enter values for the Provider URI and JNDI
Context Class fields.
Figure 1: Application Server Configuration
- Enter a user name and password for the application server.
- Click Add Application Server . If the configuration
details were entered correctly, you should see the server you configured
in the Use Existing list.
- You can enter other application server configurations if you want.
Otherwise, click Next .
- Click Browse to locate the file containing the home
and remote interfaces for your EJB.
Figure 2: Adding EJB Interface
- Click Next. The EJB remote/home interfaces that you
selected in the previous step appear on this page.
Figure 3: Selecting Interfaces
- 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.
- Enter the JNDI Bean Name for your EJB.
- Click Deploy Service.
If the service deployment was successful, you will see the EJB service
you just exposed on the Service List page.