You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Sample of a Stateless Session Bean in EJB 3.0

This sample will demonstrate the following new features from EJB 3.0

  1. Elimination of the requirement for EJB component interfaces for session beans. The required business interface for a session bean can be a plain Java interface rather than an EJBObject, EJBLocalObject, or java.rmi.Remote interface.
  2. Elimination of the requirement for home interfaces for session beans.
  3. Encapsulation of environmental dependencies and JNDI access through the use of annotations, dependency injection mechanisms, and simple lookup mechanisms.
  4. Introduction of Java metadata annotations to be used as an alternative to deployment descriptors.

Installation instructions

  1. Download the calculator-stateless-pojo.ear from this page.
  2. Go to the $geronimo_home/bin directory and start the v2.0-M2 server
  3. Deploy the downloaded ear using the command
    deploy --user system --password manager deploy <path to the downloaded ear>
    
  4. Click on this url *http://localhost:8080/calculator-stateless*. Read the documentation there.

    Once you go the sample application, click on the "source" tab in the top right hand corner to see the source code. Click on the "javadoc" tab to see the javadocs.

  • No labels