You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2008/04/19 05:59:18 UTC

svn commit: r649752 - in /openejb/trunk/openejb3/examples/injection-of-env-entry/src/main: java/org/superbiz/injection/Invoice.java java/org/superbiz/injection/InvoiceBean.java resources/META-INF/ejb-jar.xml

Author: dblevins
Date: Fri Apr 18 20:59:15 2008
New Revision: 649752

URL: http://svn.apache.org/viewvc?rev=649752&view=rev
Log:
Updated to use a more trimmed xml

Modified:
    openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/Invoice.java
    openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java
    openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml

Modified: openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/Invoice.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/Invoice.java?rev=649752&r1=649751&r2=649752&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/Invoice.java (original)
+++ openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/Invoice.java Fri Apr 18 20:59:15 2008
@@ -16,9 +16,12 @@
  */
 package org.superbiz.injection;
 
+import javax.ejb.Remote;
+
 /**
  * @version $Rev$ $Date$
  */
+@Remote
 public interface Invoice {
 
     void addLineItem(LineItem item) throws TooManyItemsException;

Modified: openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java?rev=649752&r1=649751&r2=649752&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java (original)
+++ openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java Fri Apr 18 20:59:15 2008
@@ -16,25 +16,24 @@
  */
 package org.superbiz.injection;
 
+import javax.annotation.Resource;
+import javax.ejb.Stateful;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.annotation.Resource;
-import javax.ejb.Remote;
-
 /**
  * This example demostrates the use of the injection of environment entries
  * using <b>Resource</b> annotation.
- * 
+ * <p/>
  * "EJB Core Contracts and Requirements" specification section 16.4.1.1.
- * 
+ *
  * @version $Rev$ $Date$
  */
 //START SNIPPET: code
-@Remote
+@Stateful
 public class InvoiceBean implements Invoice {
 
-    int maxLineItems;
+    private int maxLineItems;
 
     private List<LineItem> items = new ArrayList<LineItem>();
 
@@ -43,16 +42,16 @@
     /**
      * Injects the <b>maxLineItems</b> simple environment entry through bean
      * method.
-     * 
+     *
      * The JavaBeans property name (not the method name) is used as the default
      * JNDI name. By default, the JavaBeans propery name is combined with the
      * name of the class in which the annotation is used and is used directly as
      * the name in the bean's naming context. JNDI name for this entry would
      * be
      * java:comp/env/org.apache.openejb.examples.resource.InvoiceBean/maxLineItems
-     * 
+     *
      * Refer "EJB Core Contracts and Requirements" specification section 16.2.2.
-     * 
+     *
      * @param maxLineItems
      */
     @Resource

Modified: openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml?rev=649752&r1=649751&r2=649752&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml (original)
+++ openejb/trunk/openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml Fri Apr 18 20:59:15 2008
@@ -24,9 +24,6 @@
   <enterprise-beans>
     <session>
       <ejb-name>InvoiceBean</ejb-name>
-      <ejb-class>org.superbiz.injection.InvoiceBean</ejb-class>
-      <session-type>Stateful</session-type>
-      <transaction-type>Container</transaction-type>
       <env-entry>
         <description>The maximum number of line items per invoice.</description>
         <env-entry-name>org.superbiz.injection.InvoiceBean/maxLineItems</env-entry-name>