[jboss-cvs] JBossAS SVN: r82449 - in projects/ejb3/trunk/docs/tutorial: stateful and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 19 12:27:34 EST 2008


Author: jaikiran
Date: 2008-12-19 12:27:34 -0500 (Fri, 19 Dec 2008)
New Revision: 82449

Added:
   projects/ejb3/trunk/docs/tutorial/stateful/
   projects/ejb3/trunk/docs/tutorial/stateful/build.xml
   projects/ejb3/trunk/docs/tutorial/stateful/jndi.properties
   projects/ejb3/trunk/docs/tutorial/stateful/log4j.xml
   projects/ejb3/trunk/docs/tutorial/stateful/pom.xml
   projects/ejb3/trunk/docs/tutorial/stateful/src/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCart.java
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/
   projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/Client.java
   projects/ejb3/trunk/docs/tutorial/stateful/stateful.html
   projects/ejb3/trunk/docs/tutorial/stateful/stateful.wiki
Log:
Initial version of the stateful tutorial

Added: projects/ejb3/trunk/docs/tutorial/stateful/build.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/build.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/build.xml	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+
+<!-- ======================================================================= -->
+<!-- JBoss build file                                                       -->
+<!-- ======================================================================= -->
+
+<project name="JBoss" default="ejbjar" basedir=".">
+
+   	<property environment="env"/>
+   	<property name="src.dir" value="${basedir}/src"/>
+	<property name="jboss.home" value="${env.JBOSS_HOME}"/>
+	<property name="jboss.server.config" value="default"/>
+	<property name="build.dir" value="${basedir}/build"/>
+   	<property name="build.classes.dir" value="${build.dir}/classes"/>
+	<property name="build.artifact" value="jboss-ejb3-tutorial-stateful.jar"/>
+
+   <!-- Build classpath -->
+   <path id="classpath">
+      <!-- So that we can get jndi.properties for InitialContext -->
+      <pathelement location="${basedir}"/>
+   		<!-- Only the jbossall-client.jar should ideally be sufficient -->
+      <fileset dir="${jboss.home}/client">
+         <include name="**/jbossall-client.jar"/>
+      </fileset>
+      <pathelement location="${build.classes.dir}"/>
+   </path>
+
+   <property name="build.classpath" refid="classpath"/>
+
+   <!-- =================================================================== -->
+   <!-- Prepares the build directory                                        -->
+   <!-- =================================================================== -->
+   <target name="prepare">
+      <mkdir dir="${build.dir}"/>
+      <mkdir dir="${build.classes.dir}"/>
+   </target>
+
+   <!-- =================================================================== -->
+   <!-- Compiles the source code                                            -->
+   <!-- =================================================================== -->
+   <target name="compile" depends="prepare">
+      <javac srcdir="${src.dir}"
+         destdir="${build.classes.dir}"
+         debug="on"
+         deprecation="on"
+         optimize="off"
+         includes="**">
+         <classpath refid="classpath"/>
+      </javac>
+   </target>
+
+   <target name="ejbjar" depends="compile">
+      <jar jarfile="build/${build.artifact}">
+         <fileset dir="${build.classes.dir}">
+            <include name="**/*.class"/>
+         </fileset>
+      </jar>
+      <copy file="build/${build.artifact}" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+   </target>
+
+   <target name="run" depends="ejbjar">
+      <java classname="org.jboss.tutorial.stateful.client.Client" fork="yes" dir=".">
+         <classpath refid="classpath"/>
+      </java>
+   </target>
+
+   <!-- =================================================================== -->
+   <!-- Cleans up generated stuff                                           -->
+   <!-- =================================================================== -->
+   <target name="clean.db">
+      <delete dir="${jboss.home}/server/${jboss.server.config}/data/hypersonic"/>
+   </target>
+
+   <target name="clean">
+      <delete dir="${build.dir}"/>
+      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/${build.artifact}"/>
+   </target>
+
+
+</project>
+


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/build.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/jndi.properties
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/jndi.properties	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/jndi.properties	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=localhost


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/jndi.properties
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/log4j.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/log4j.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/log4j.xml	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 32809 2005-06-24 04:49:29Z bill $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+   
+<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Messagen -->
+         <!--
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+         -->
+         <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L)  -%m%n"/>
+      </layout>
+</appender>
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+   </root>
+
+</log4j:configuration>


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/log4j.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/pom.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/pom.xml	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  
+
+  
+   
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.jboss.ejb3</groupId>
+    <artifactId>jboss-ejb3-tutorial-common</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+    <relativePath>../common/</relativePath>
+  </parent>
+
+  <properties>
+    <ejb3.tutorial.client>org.jboss.tutorial.stateful.client.Client</ejb3.tutorial.client>
+  </properties>
+
+
+  <artifactId>jboss-ejb3-tutorial-stateful</artifactId>
+  <version>0.1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+  <name>EJB3.0 Stateful Bean Tutorial</name>
+  <url>http://labs.jboss.com/jbossejb3/</url>
+  <description>
+    Tutorial for Stateful EJB 3.0
+  </description>
+  
+  
+  
+  
+
+
+</project>


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/pom.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCart.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCart.java	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCart.java	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.stateful.bean;
+
+import java.util.HashMap;
+import javax.ejb.Remove;
+
+public interface ShoppingCart
+{
+   void buy(String product, int quantity);
+
+   HashMap<String, Integer> getCartContents();
+
+   @Remove void checkout();
+}


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCart.java
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.stateful.bean;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.ejb.Remote;
+
+
+ at Stateful
+ at Remote(ShoppingCart.class)
+public class ShoppingCartBean implements ShoppingCart, Serializable
+{
+   private HashMap<String, Integer> cart = new HashMap<String, Integer>();
+
+   public void buy(String product, int quantity)
+   {
+      if (cart.containsKey(product))
+      {
+         int currq = cart.get(product);
+         currq += quantity;
+         cart.put(product, currq);
+      }
+      else
+      {
+         cart.put(product, quantity);
+      }
+   }
+
+   public HashMap<String, Integer> getCartContents()
+   {
+      return cart;
+   }
+
+   @Remove
+   public void checkout()
+   {
+      System.out.println("To be implemented");
+   }
+}


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/Client.java
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/Client.java	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/Client.java	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tutorial.stateful.client;
+
+
+import java.util.HashMap;
+import javax.naming.InitialContext;
+import org.jboss.tutorial.stateful.bean.ShoppingCart;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class Client
+{
+   public static void main(String[] args) throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      ShoppingCart cart = (ShoppingCart) ctx.lookup("ShoppingCartBean/remote");
+
+      System.out.println("Buying 1 memory stick");
+      cart.buy("Memory stick", 1);
+      System.out.println("Buying another memory stick");
+      cart.buy("Memory stick", 1);
+
+      System.out.println("Buying a laptop");
+      cart.buy("Laptop", 1);
+
+      System.out.println("Print cart:");
+      HashMap<String, Integer> fullCart = cart.getCartContents();
+      for (String product : fullCart.keySet())
+      {
+         System.out.println(fullCart.get(product) + "     " + product);
+      }
+
+      System.out.println("Checkout");
+      cart.checkout();
+
+      System.out.println("Should throw an object not found exception by invoking on cart after @Remove method");
+      try
+      {
+         cart.getCartContents();
+      }
+      catch (javax.ejb.NoSuchEJBException e)
+      {
+         System.out.println("Successfully caught no such object exception.");
+      }
+
+
+   }
+}


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/src/org/jboss/tutorial/stateful/client/Client.java
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/stateful.html
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/stateful.html	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/stateful.html	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,62 @@
+<html>
+<body>
+<p>
+<h2>Stateful Beans</h2>
+
+It is very easy to create a Stateful Bean with EJB 3.0.  All bean types are homeless in EJB 3.0 so all you have to do to create a Stateful bean is to create a bean class and have it implement at least one interface.  Take a look at <a href="src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java">ShoppingCartBean.java</a>
+</p><p>
+The first thing to notice is that the class is tagged as <tt>@Stateful</tt>.  This marks the class as a stateful bean and the deployer will deploy that class as a stateful bean EJB container.
+</p><p>
+ShoppingCartBean also implements a remote interface.  Take a look at <a href="src/org/jboss/tutorial/stateful/bean/ShoppingCart.java">ShoppingCart.java</a>.  To define this as the remote interface of ShoppingCartBean
+you need to use the <tt>@javax.ejb.Remote</tt> annotation on the ShoppingCartBean class.
+</p><p>
+<h4>@Remove</h4>
+
+Take another look at <a href="src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java">ShoppingCartBean.java</a>.  Look for the method annotated as <tt>@Remove</tt>.  Instead of explicitly calling EJBObject.remove() in your applications and thus polluting it further with J2EE specific code, any method tagged with <tt>@Remove</tt> will cause the stateful bean instance to be removed from the container at the end of the method call.  
+</p><p>
+<h4>JNDI Bindings</h4>
+
+The ShoppingCartBean will have its remote interface bound in JNDI, by default, under the ejbName/local and/or ejbName/remote for the local and remote interfaces, respectively.
+</p><p>
+<h4>Client</h4>
+
+Open up <a href="src/org/jboss/tutorial/stateful/client/Client.java">Client.java</a>.  You'll see that it looks up the stateful bean under "ejbName/remote". Also notice
+that there is no Home interface and you can begin executing on the stateful bean right away.  When you access the bean in JNDI, an instance of the stateful bean
+will be created on the server.  So, when you need a different instance of the stateful bean, you do an additional <tt>jndi.lookup()</tt> to get this new reference.
+</p><p>
+<h4>Building and Running</h4>
+
+To build and run the example, make sure you have <tt>ejb3.deployer</tt> installed in JBoss 4.0.x and have JBoss running.  See the reference manual on how to install EJB 3.0.  
+<pre>
+Unix:    $ export JBOSS_HOME=&lt;where your jboss 4.0 distribution is&gt;
+Windows: $ set JBOSS_HOME=&lt;where your jboss 4.0 distribution is&gt;
+$ ant
+$ ant run
+
+run:
+run:
+     [java] Buying 1 memory stick
+     [java] 2004-10-06 19:37:16,869 INFO org.jboss.remoting.InvokerRegistry[main] - Failed to load soap remoting transpo
+rt: org/apache/axis/AxisFault
+     [java] Buying another memory stick
+     [java] Buying a laptop
+     [java] Print cart:
+     [java] 2     Memory stick
+     [java] 1     Laptop
+     [java] Checkout
+     [java] Should throw an object not found exception by invoking on cart after @Remove method
+     [java] Successfully caught no such object exception.
+</pre>
+</p><p>
+The INFO message you can ignore.  It will be fixed in later releases of JBoss 4.0.
+</p><p>
+<h4>Jar structure</h4>
+
+EJB 3.0 beans must be packaged in a JAR file with the suffix <tt>.jar</tt>.  Running the ant script above creates a JAR file within the deploy/ directory of JBoss.  All that needs to be in that jar is your server-side class files.  So basically just the ShoppingCartBean and the interfaces it implements.  JBoss will automatically browse the JAR file to determine if any EJBs are annotated by any classes within it.  THere is no precompilation step.
+</p><p>
+</p><p>
+</p><p>
+</p><p>
+</p>
+</body>
+</html>


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/stateful.html
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/ejb3/trunk/docs/tutorial/stateful/stateful.wiki
===================================================================
--- projects/ejb3/trunk/docs/tutorial/stateful/stateful.wiki	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/stateful/stateful.wiki	2008-12-19 17:27:34 UTC (rev 82449)
@@ -0,0 +1,50 @@
+!!!Stateful Beans
+It is very easy to create a Stateful Bean with EJB 3.0.  All bean types are homeless in EJB 3.0 so all you have to do to create a Stateful bean is to create a bean class and have it implement at least one interface.  Take a look at [ShoppingCartBean.java|src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java]
+
+The first thing to notice is that the class is tagged as {{@Stateful}}.  This marks the class as a stateful bean and the deployer will deploy that class as a stateful bean EJB container.
+
+ShoppingCartBean also implements a remote interface.  Take a look at [ShoppingCart.java|src/org/jboss/tutorial/stateful/bean/ShoppingCart.java].  To define this as the remote interface of ShoppingCartBean
+you need to use the {{@javax.ejb.Remote}} annotation on the ShoppingCartBean class.
+
+!@Remove
+Take another look at [ShoppingCartBean.java|src/org/jboss/tutorial/stateful/bean/ShoppingCartBean.java].  Look for the method annotated as {{@Remove}}.  Instead of explicitly calling EJBObject.remove() in your applications and thus polluting it further with J2EE specific code, any method tagged with {{@Remove}} will cause the stateful bean instance to be removed from the container at the end of the method call.  
+
+!JNDI Bindings
+The ShoppingCartBean will have its remote interface bound in JNDI, by default, under the ejbName/local and/or ejbName/remote for the local and remote interfaces, respectively.
+
+!Client
+Open up [Client.java|src/org/jboss/tutorial/stateful/client/Client.java].  You'll see that it looks up the stateful bean under "ejbName/remote". Also notice
+that there is no Home interface and you can begin executing on the stateful bean right away.  When you access the bean in JNDI, an instance of the stateful bean
+will be created on the server.  So, when you need a different instance of the stateful bean, you do an additional {{jndi.lookup()}} to get this new reference.
+
+!Building and Running
+To build and run the example, make sure you have {{ejb3.deployer}} installed in JBoss 4.0.x and have JBoss running.  See the reference manual on how to install EJB 3.0.  
+{{{
+Unix:    $ export JBOSS_HOME=<where your jboss 4.0 distribution is>
+Windows: $ set JBOSS_HOME=<where your jboss 4.0 distribution is>
+$ ant
+$ ant run
+
+run:
+run:
+     [java] Buying 1 memory stick
+     [java] 2004-10-06 19:37:16,869 INFO org.jboss.remoting.InvokerRegistry[main] - Failed to load soap remoting transpo
+rt: org/apache/axis/AxisFault
+     [java] Buying another memory stick
+     [java] Buying a laptop
+     [java] Print cart:
+     [java] 2     Memory stick
+     [java] 1     Laptop
+     [java] Checkout
+     [java] Should throw an object not found exception by invoking on cart after @Remove method
+     [java] Successfully caught no such object exception.
+}}}
+
+The INFO message you can ignore.  It will be fixed in later releases of JBoss 4.0.
+
+!Jar structure
+EJB 3.0 beans must be packaged in a JAR file with the suffix {{.jar}}.  Running the ant script above creates a JAR file within the deploy/ directory of JBoss.  All that needs to be in that jar is your server-side class files.  So basically just the ShoppingCartBean and the interfaces it implements.  JBoss will automatically browse the JAR file to determine if any EJBs are annotated by any classes within it.  THere is no precompilation step.
+
+
+
+


Property changes on: projects/ejb3/trunk/docs/tutorial/stateful/stateful.wiki
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-cvs-commits mailing list