...
- 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.
Deployment Plans
The structure of the deployable should look like the following:
No Format |
---|
|
|- calculator-stateless-ear-2.0-M2.ear
|- META-INF
|- application.xml
|- geronimo-application.xml
|- calculator-stateless-ejb-2.0-M2.jar
|- calculator-stateless-war-2.0-M2.war
|
application.xml: The JAR file is referenced to provide the functionality of this deployable. The WAR file is referenced in order to show the usage of this deployable through a web based interface. The context-root is set to be /calculator-stateless so that the URL for this application will be http://<hostname>:<port>/calculator-stateless.
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | application.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
<description>Geronimo Sample EAR for Stateless Session</description>
<display-name>Geronimo Sample EAR for Stateless Session</display-name>
<module>
<web>
<web-uri>calculator-stateless-war-2.0-M2.war</web-uri>
<context-root>/calculator-stateless</context-root>
</web>
</module>
<module>
<ejb>calculator-stateless-ejb-2.0-M2.jar</ejb>
</module>
</application>
|
geronimo-application.xml: Information about the project (e.g. module's unique identification, any dependencies) is described inside the <environment> tag. In this case, there are no dependencies so there is nothing to be listed. However, it is a good idea to give this module some sort of unique identification, so that it can later be referenced by some other deployable application.
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | geronimo-application.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
<environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
<moduleId>
<groupId>org.apache.geronimo.samples</groupId>
<artifactId>calculator-stateless-ear</artifactId>
<version>2.0-M2</version>
<type>ear</type>
</moduleId>
</environment>
</application>
|
Installation instructions
...