geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r499600 - /geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp
Date Wed, 24 Jan 2007 22:45:05 GMT
Author: prasad
Date: Wed Jan 24 14:45:04 2007
New Revision: 499600

URL: http://svn.apache.org/viewvc?view=rev&rev=499600
Log:
* modify docu text for dependency injection section

Modified:
    geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp

Modified: geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp?view=diff&rev=499600&r1=499599&r2=499600
==============================================================================
--- geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp
(original)
+++ geronimo/samples/trunk/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp
Wed Jan 24 14:45:04 2007
@@ -82,17 +82,19 @@
   </FONT>
   <H3>A POJO as a business interface</H3>
   <font style="font-size:12px">
-  Notice the stateless session bean <A HREF="./xref/org/apache/geronimo/samples/slsb/calculator/Calculator.html"
target="source_window"><CODE>Calculator.java</CODE></A> implements
+  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.
   </FONT>
   
   <H3>Dependency Injection</H3>
   <font style="font-size:12px">
-  The servlet <A HREF="./xref/org/apache/geronimo/samples/calculator/CalculatorServlet.html"
target="source_window"><CODE>CalculatorServlet.java</CODE></A> declares
an instance variable
-  whose type is the same as the business interface of the session bean. 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, with Java EE 5.0, the servlet can just declare
-  its dependency on the bean by just annotating the instance variable with the @EJB annotation.
At runtime, when the servlet instance is created, the container injects
-  (or provides) an instance of an object that implements the business interface. 
+  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 whose 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 the bean’s EJBContext is set.
   </FONT>
   
   <H3>No deployment descriptor</H3>



Mime
View raw message