You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2008/09/30 23:57:15 UTC
svn commit: r700592 -
/geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp
Author: jbohn
Date: Tue Sep 30 14:57:15 2008
New Revision: 700592
URL: http://svn.apache.org/viewvc?rev=700592&view=rev
Log:
remove xref links in calculator UI
Modified:
geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp
Modified: geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp?rev=700592&r1=700591&r2=700592&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp (original)
+++ geronimo/samples/trunk/samples/calculator/calculator-war/src/main/webapp/sample-docu.jsp Tue Sep 30 14:57:15 2008
@@ -92,25 +92,26 @@
<h3>A POJO as a business interface</h3>
<font style="font-size:12px">
- Notice that the stateless session bean <a href="./xref/org/apache/geronimo/samples/slsb/calculator/Calculator.html" target="source_window"><code>Calculator.java</code></a> implements
- just a simple java interface and not an EJB component interface like EJBObject, EJBLocalObject or java.rmi.Remote.
+ Notice that the stateless session bean, <code>Calculator.java</code> implements just a simple java interface and not an EJB component
+ interface like EJBObject, EJBLocalObject or java.rmi.Remote.
</font>
<h3>Dependency Injection</h3>
<font style="font-size:12px">
- Notice that the servlet <a href="./xref/org/apache/geronimo/samples/calculator/CalculatorServlet.html" target="source_window"><code>CalculatorServlet.java</code></a>
- declares an instance variable with an @EJB annotation. The variable is that of a session bean and it's type is the same as that of it's business interface.
- In earlier versions, the servlet would have done a JNDI lookup of the bean's home interface in the component's environment.
- It then would have had to create the instance using the create method of the home interface.
- However in Java EE 5.0, the servlet can just declare its dependency on the bean by just annotating the instance variable with the @EJB annotation.
- When the servlet instance is created during runtime, the container automatically initializes these annotated variables with an instance of an object that implements the business interface.
- This initialization occurs before any business methods are invoked on the bean instance and after the time the beans EJBContext is set.
+ If you view the servlet <code>CalculatorServlet.java</code>, you will notice that it declares an instance variable with an @EJB
+ annotation. The variable is that of a session bean and it's type is the same as that of it's business interface. In earlier
+ versions, the servlet would have done a JNDI lookup of the bean's home interface in the component's environment. It then would
+ have had to create the instance using the create method of the home interface. However in Java EE 5.0, the servlet can just declare
+ its dependency on the bean by just annotating the instance variable with the @EJB annotation. When the servlet instance is created
+ during runtime, the container automatically initializes these annotated variables with an instance of an object that implements
+ the business interface. This initialization occurs before any business methods are invoked on the bean instance and after the
+ time the beans EJBContext is set.
</font>
<h3>No deployment descriptor</h3>
<font style="font-size:12px">
- Notice the absence of the traditional deployment descriptor, <code>ejb-jar.xml</code>. The bean declarations that used to be done there are now done by the
- annotations in the code.
+ Notice the absence of the traditional deployment descriptor, <code>ejb-jar.xml</code>. The bean declarations that used to be done
+ there are now done by the annotations in the code.
</font>
</font>