Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 10058 invoked from network); 12 May 2008 22:25:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 May 2008 22:25:43 -0000 Received: (qmail 33850 invoked by uid 500); 12 May 2008 22:25:45 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 33797 invoked by uid 500); 12 May 2008 22:25:45 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 33785 invoked by uid 99); 12 May 2008 22:25:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2008 15:25:45 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2008 22:25:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CEA4C2388999; Mon, 12 May 2008 15:25:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r655673 - /geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp Date: Mon, 12 May 2008 22:25:22 -0000 To: scm@geronimo.apache.org From: jbohn@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080512222522.CEA4C2388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jbohn Date: Mon May 12 15:25:22 2008 New Revision: 655673 URL: http://svn.apache.org/viewvc?rev=655673&view=rev Log: GERONIMO-4009 fix HTML errors and warnings from calculator-stateless-pojo - patch by Ted Kirby Modified: geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp Modified: geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp?rev=655673&r1=655672&r2=655673&view=diff ============================================================================== --- geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp (original) +++ geronimo/samples/trunk/samples/calculator-stateless-pojo/calculator-stateless-war/src/main/webapp/sample-docu.jsp Mon May 12 15:25:22 2008 @@ -19,18 +19,17 @@ A Stateless Session Sample - Calculator - + - + -
-

A Stateless Session Sample

-

Calculator

+

A Stateless Session Sample

+

Calculator

This sample shows an EJB 3.0 Stateless session bean. @@ -42,7 +41,8 @@ %>

- + +
@@ -53,56 +53,56 @@
First Number
- + - + - -
- + +
+
<%=result%>
- -

+ +

This sample demonstrates the following new features from EJB 3.0 -

    -
  1. Elimination of the requirement for EJB component interfaces for session beans. The required +
      +
    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, +
    4. Elimination of the requirement for home interfaces for session beans. +
    5. Encapsulation of environmental dependencies and JNDI access through the use of annotations, dependency injection mechanisms, and simple lookup mechanisms. -
    6. Introduction of Java metadata annotations to be used as an alternative to deployment descriptors. -
    -

    - -

    A POJO as a business interface

    +
  2. Introduction of Java metadata annotations to be used as an alternative to deployment descriptors. +
+

+ +

A POJO as a business interface

- Notice that the stateless session bean Calculator.java implements + Notice that the stateless session bean Calculator.java implements just a simple java interface and not an EJB component interface like EJBObject, EJBLocalObject or java.rmi.Remote. - + -

Dependency Injection

+

Dependency Injection

- Notice that the servlet CalculatorServlet.java + Notice that the servlet CalculatorServlet.java 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 bean’s EJBContext is set. - + -

No deployment descriptor

+

No deployment descriptor

- Notice the absence of the traditional deployment descriptor, ejb-jar.xml. The bean declarations that used to be done there are now done by the + Notice the absence of the traditional deployment descriptor, ejb-jar.xml. The bean declarations that used to be done there are now done by the annotations in the code. - - - + + +