HomeApache Geronimo v2.0 > Documentation > Sample applications > Using some of EJB 3.0 functionalities

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 calculator-stateless-ear-2.0-M2.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 console by clicking on this link. The userid/password for the console is system/manager. Or to deploy using the command line, use the following 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.