ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
Working with Local EJB Services
The Axis EJB provider also works with local EJB components as well as remote EJB
components. In order for the local EJB version to work, the EJB components have to
be co located with the Web Application. It s actually easier to work with Local EJB
components since there are less parameters in the Axis Web Services Deployment
Descriptor. Here is an example Axis Web Services Deployment Descriptor that works
with a local EJB version of your EJB component.
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
value="rickhightower.axis.ejb.tutorial.HelloLocalHome"/>
value="rickhightower.axis.ejb.tutorial.HelloLocal"/>
Notice that you do not have to specify the JNDI entries for the JNDI context factory or
the JNDI URL. You just have to specify where the local EJB component is mapped into
the environment naming context (ENC) of the Web application. The Axis EJB provider
will look up the local EJB component in the ENC, call the create method on the home,
and invoke methods on the EJB just like the RPC provide does with a POJO.
Of course if you are going to use a Local EJB component, you need to define a local
interface, a local home interface, add them to your
ejb jar.xml
, and add an
ejb local ref
to your
web.xml
file.
Here is the
ejb local ref
you need to add to
web.xml
the following:
ejb/Hello
Session
rickhightower.axis.ejb.tutorial.HelloLocalHome
rickhightower.axis.ejb.tutorial.HelloLocal
ejbclient.jar#Hello
Page 22 of 33
Service enable EJB SessionBeans with the IBM ETTK






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

servlet web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved