Sample of a Stateless Session Bean in EJB 3.0
This sample will demonstrate the following new features from EJB 3.0
- 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.
- Elimination of the requirement for home interfaces for session beans.
- Encapsulation of environmental dependencies and JNDI access through the use of annotations, dependency injection mechanisms, and simple lookup mechanisms.
- Introduction of Java metadata annotations to be used as an alternative to deployment descriptors.
Installation instructions
- Download the calculator-stateless-pojo.ear\ from this page.
- Go to the $geronimo_home/bin directory and start the v2.0-M2 server
- Deploy the downloaded ear using the command
deploy --user system --password manager deploy <path to the downloaded ear>
- 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.