geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjbly...@apache.org
Subject svn commit: r568223 - in /geronimo/daytrader/trunk/modules: ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/ web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/ web/src/main/webapp/ web/src/main/webapp/WEB-INF/
Date Tue, 21 Aug 2007 18:16:00 GMT
Author: cjblythe
Date: Tue Aug 21 11:15:58 2007
New Revision: 568223

URL: http://svn.apache.org/viewvc?rev=568223&view=rev
Log:
DAYTRADER-52 - (part 2) Add new EJB 3 primitives that mimic exisitng EJB 2.1 primitives

Added:
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java   (with props)
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java   (with props)
Modified:
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBLocal.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBRemote.java
    geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml
    geronimo/daytrader/trunk/modules/web/src/main/webapp/web_prmtv.html

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java?rev=568223&r1=568222&r2=568223&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java (original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java Tue Aug 21 11:15:58 2007
@@ -626,6 +626,55 @@
         entityManager.persist(newHolding);
         return newHolding;
     }
+    
+    public double investmentReturn(double investment, double NetValue) throws Exception {
+        if (Log.doTrace()) Log.trace("TradeSLSBBean:investmentReturn");
+    
+        double diff = NetValue - investment;
+        double ir = diff / investment;
+        return ir;
+    }
+    
+    public QuoteDataBean pingTwoPhase(String symbol) throws Exception {
+        try{
+            if (Log.doTrace()) Log.trace("TradeSLSBBean:pingTwoPhase", symbol);
+            QuoteDataBean quoteData=null;
+            Connection conn = null;
+            Session sess = null;        
+            
+            try {
+
+                //Get a Quote and send a JMS message in a 2-phase commit
+                quoteData = entityManager.find(QuoteDataBean.class, symbol);
+
+                conn = queueConnectionFactory.createConnection();                        
+                sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                MessageProducer msgProducer = sess.createProducer(tradeBrokerQueue);
+                TextMessage message = sess.createTextMessage();
+
+                String command= "ping";
+                message.setStringProperty("command", command);
+                message.setLongProperty("publishTime", System.currentTimeMillis());         
+                message.setText("Ping message for queue java:comp/env/jms/DTBrokerQueue3 sent from TradeSLSBBean:pingTwoPhase at " + new java.util.Date());
+
+                msgProducer.send(message);  
+            } 
+            catch (Exception e) {
+                Log.error("TradeSLSBBean:pingTwoPhase -- exception caught",e);
+            }
+
+            finally {
+                if (conn != null)
+                    conn.close();   
+                if (sess != null)
+                    sess.close();
+            }           
+
+            return quoteData;
+        } catch (Exception e){
+            throw new Exception(e.getMessage(),e);
+        }
+    }
 
     class quotePriceComparator implements java.util.Comparator {
         public int compare(Object quote1, Object quote2) {

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBLocal.java?rev=568223&r1=568222&r2=568223&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBLocal.java (original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBLocal.java Tue Aug 21 11:15:58 2007
@@ -19,7 +19,11 @@
 
 import javax.ejb.Local;
 import org.apache.geronimo.samples.daytrader.TradeServices;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
 
 @Local
 public interface TradeSLSBLocal extends TradeServices {
+    public double investmentReturn(double investment, double NetValue) throws Exception;
+    
+    public QuoteDataBean pingTwoPhase(String symbol) throws Exception;
 }

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBRemote.java?rev=568223&r1=568222&r2=568223&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBRemote.java (original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBRemote.java Tue Aug 21 11:15:58 2007
@@ -19,7 +19,11 @@
 
 import javax.ejb.Remote;
 import org.apache.geronimo.samples.daytrader.TradeServices;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
 
 @Remote
 public interface TradeSLSBRemote extends TradeServices {
+    public double investmentReturn(double investment, double NetValue) throws Exception;
+    
+    public QuoteDataBean pingTwoPhase(String symbol) throws Exception;
 }

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,105 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+/**
+ * 
+ * Primitive designed to run within the TradeApplication and makes use of
+ * {@link trade_client.TradeConfig} for config parameters and random stock
+ * symbols. Servlet will generate a random stock symbol and get the price of
+ * that symbol using a {@link trade.Quote} Entity EJB This tests the common path
+ * of a Servlet calling an Entity EJB to get data
+ * 
+ */
+
+public class PingServlet2Entity extends HttpServlet {
+    private static String initTime;
+
+    private static int hitCount;
+
+    @PersistenceContext
+    private EntityManager em;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+
+        QuoteDataBean quote = null;
+        String symbol = null;
+
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>Servlet2Entity</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Entity<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\"><BR>PingServlet2Entity accesses an EntityManager"
+                + " using a PersistenceContext annotaion and then gets the price of a random symbol (generated by TradeConfig)" + " through the EntityManager find method");
+        try {
+            // generate random symbol
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    // get a random symbol to look up and get the key to that
+                    // symbol.
+                    symbol = TradeConfig.rndSymbol();
+                    // find the EntityInstance.
+                    quote = (QuoteDataBean) em.find(QuoteDataBean.class, symbol);
+                }
+            } catch (Exception e) {
+                Log.error("web_primtv.PingServlet2Entity.doGet(...): error performing find");
+                throw e;
+            }
+            // get the price and print the output.
+
+            output.append("<HR>initTime: " + initTime + "<BR>Hit Count: ").append(hitCount++);
+            output.append("<HR>Quote Information<BR><BR> " + quote.toHTML());
+            output.append("</font><HR></body></html>");
+            out.println(output.toString());
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Entity.doGet(...): error");
+            // this will send an Error to teh web applications defined error
+            // page.
+            res.sendError(500, "PingServlet2Entity.doGet(...): error" + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Entity EJB path";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Entity.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,130 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.IOException;
+
+import javax.annotation.Resource;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+/**
+ * This primitive is designed to run inside the TradeApplication and relies upon
+ * the {@link org.apache.geronimo.samples.daytrader.TradeConfig} class to set
+ * configuration parameters. PingServlet2MDBQueue tests key functionality of a
+ * servlet call to a post a message to an MDB Queue. The TradeBrokerMDB receives
+ * the message This servlet makes use of the MDB EJB
+ * {@link org.apache.geronimo.samples.daytrader.ejb.TradeBrokerMDB} by posting a
+ * message to the MDB Queue
+ */
+public class PingServlet2MDBQueue extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @Resource(name = "jms/QueueConnectionFactory")
+    private ConnectionFactory queueConnectionFactory;
+
+    @Resource(name = "DTBrokerQueue3")
+    private Queue tradeBrokerQueue;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        // use a stringbuffer to avoid concatenation of Strings
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>PingServlet2MDBQueue</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2MDBQueue<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">" + "Tests the basic operation of a servlet posting a message to an EJB MDB through a JMS Queue.<BR>"
+                + "<FONT color=\"red\"><B>Note:</B> Not intended for performance testing.</FONT>");
+
+        try {
+            Connection conn = queueConnectionFactory.createConnection();
+
+            try {
+                TextMessage message = null;
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                    try {
+                        MessageProducer producer = sess.createProducer(tradeBrokerQueue);
+
+                        message = sess.createTextMessage();
+
+                        String command = "ping";
+                        message.setStringProperty("command", command);
+                        message.setLongProperty("publishTime", System.currentTimeMillis());
+                        message.setText("Ping message for queue java:comp/env/jms/DTBrokerQueue3 sent from PingServlet2MDBQueue at " + new java.util.Date());
+                        producer.send(message);
+                    } finally {
+                        sess.close();
+                    }
+                }
+
+                // write out the output
+                output.append("<HR>initTime: ").append(initTime);
+                output.append("<BR>Hit Count: ").append(hitCount++);
+                output.append("<HR>Posted Text message to java:comp/env/jms/DTBrokerQueue3 destination");
+                output.append("<BR>Message: ").append(message);
+                output.append("<BR><BR>Message text: ").append(message.getText());
+                output.append("<BR><HR></FONT></BODY></HTML>");
+                out.println(output.toString());
+
+            } catch (Exception e) {
+                Log.error("PingServlet2MDBQueue.doGet(...):exception posting message to DTBrokerQueue3 destination ");
+                throw e;
+            } finally {
+                conn.close();
+            }
+        } // this is where I actually handle the exceptions
+        catch (Exception e) {
+            Log.error(e, "PingServlet2MDBQueue.doGet(...): error");
+            res.sendError(500, "PingServlet2MDBQueue.doGet(...): error, " + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, configured with trade runtime configs, tests Servlet to Session EJB path";
+
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+
+}

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBQueue.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,131 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.IOException;
+
+import javax.annotation.Resource;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+/**
+ * This primitive is designed to run inside the TradeApplication and relies upon
+ * the {@link org.apache.geronimo.samples.daytrader.TradeConfig} class to set
+ * configuration parameters. PingServlet2MDBQueue tests key functionality of a
+ * servlet call to a post a message to an MDB Topic. The TradeStreamerMDB (and
+ * any other subscribers) receives the message This servlet makes use of the MDB
+ * EJB {@link org.apache.geronimo.samples.daytrader.ejb.TradeStreamerMDB} by
+ * posting a message to the MDB Topic
+ */
+public class PingServlet2MDBTopic extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @Resource(name = "jms/TopicConnectionFactory")
+    private ConnectionFactory topicConnectionFactory;
+
+    @Resource(name = "DTStreamerTopic3")
+    private Topic tradeStreamerTopic;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        // use a stringbuffer to avoid concatenation of Strings
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>PingServlet2MDBTopic</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2MDBTopic<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">"
+                + "Tests the basic operation of a servlet posting a message to an EJB MDB (and other subscribers) through a JMS Topic.<BR>" + "<FONT color=\"red\"><B>Note:</B> Not intended for performance testing.</FONT>");
+
+        // we only want to look up the JMS resources once
+        try {
+
+            Connection conn = topicConnectionFactory.createConnection();
+
+            try {
+                TextMessage message = null;
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                    try {
+                        MessageProducer producer = sess.createProducer(tradeStreamerTopic);
+                        message = sess.createTextMessage();
+
+                        String command = "ping";
+                        message.setStringProperty("command", command);
+                        message.setLongProperty("publishTime", System.currentTimeMillis());
+                        message.setText("Ping message for topic java:comp/env/jms/DTStreamerTopic3 sent from PingServlet2MDBTopic at " + new java.util.Date());
+
+                        producer.send(message);
+                    } finally {
+                        sess.close();
+                    }
+                }
+
+                // write out the output
+                output.append("<HR>initTime: ").append(initTime);
+                output.append("<BR>Hit Count: ").append(hitCount++);
+                output.append("<HR>Posted Text message to java:comp/env/jms/DTStreamerTopic3 topic");
+                output.append("<BR>Message: ").append(message);
+                output.append("<BR><BR>Message text: ").append(message.getText());
+                output.append("<BR><HR></FONT></BODY></HTML>");
+                out.println(output.toString());
+
+            } catch (Exception e) {
+                Log.error("PingServlet2MDBTopic.doGet(...):exception posting message to DTStreamerTopic3 topic");
+                throw e;
+            } finally {
+                conn.close();
+            }
+        } // this is where I actually handle the exceptions
+        catch (Exception e) {
+            Log.error(e, "PingServlet2MDBTopic.doGet(...): error");
+            res.sendError(500, "PingServlet2MDBTopic.doGet(...): error, " + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, configured with trade runtime configs, tests Servlet to Session EJB path";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+
+}

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2MDBTopic.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,108 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+// import javax.rmi.PortableRemoteObject;
+
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+
+/**
+ * 
+ * This primitive is designed to run inside the TradeApplication and relies upon
+ * the {@link trade_client.TradeConfig} class to set configuration parameters.
+ * PingServlet2SessionEJB tests key functionality of a servlet call to a
+ * stateless SessionEJB. This servlet makes use of the Stateless Session EJB
+ * {@link trade.Trade} by calling calculateInvestmentReturn with three random
+ * numbers.
+ * 
+ */
+public class PingServlet2Session extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        // use a stringbuffer to avoid concatenation of Strings
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>PingServlet2Session</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">" + "Tests the basis path from a Servlet to a Session Bean.");
+
+        try {
+
+            try {
+                // create three random numbers
+                double rnd1 = Math.random() * 1000000;
+                double rnd2 = Math.random() * 1000000;
+                double rnd3 = Math.random() * 1000000;
+
+                // use a function to do some work.
+                double increase = 0.0;
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    increase = tradeSLSBRemote.investmentReturn(rnd1, rnd2);
+                }
+
+                // write out the output
+                output.append("<HR>initTime: " + initTime);
+                output.append("<BR>Hit Count: " + hitCount++);
+                output.append("<HR>Investment Return Information <BR><BR>investment: " + rnd1);
+                output.append("<BR>current Value: " + rnd2);
+                output.append("<BR>investment return " + increase + "<HR></FONT></BODY></HTML>");
+                out.println(output.toString());
+
+            } catch (Exception e) {
+                Log.error("PingServlet2Session.doGet(...):exception calling trade.investmentReturn ");
+                throw e;
+            }
+        } // this is where I actually handle the exceptions
+        catch (Exception e) {
+            Log.error(e, "PingServlet2Session.doGet(...): error");
+            res.sendError(500, "PingServlet2Session.doGet(...): error, " + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, configured with trade runtime configs, tests Servlet to Session EJB path";
+
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,102 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.Iterator;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.OrderDataBean;
+
+/**
+ * Primitive to test Entity Container Managed Relationshiop One to One Servlet
+ * will generate a random userID and get the profile for that user using a
+ * {@link trade.Account} Entity EJB This tests the common path of a Servlet
+ * calling a Session to Entity EJB to get CMR One to One data
+ * 
+ */
+
+public class PingServlet2Session2CMROne2Many extends HttpServlet {
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+
+        String userID = null;
+
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>Servlet2Session2CMROne20ne</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2CMROne2Many<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\"><BR>PingServlet2Session2CMROne2Many uses the Trade Session EJB"
+                + " to get the orders for a user using an EJB 3.0 Entity CMR one to many relationship");
+        try {
+
+            Collection orderDataBeans = null;
+            int iter = TradeConfig.getPrimIterations();
+            for (int ii = 0; ii < iter; ii++) {
+                userID = TradeConfig.rndUserID();
+
+                // get the users orders and print the output.
+                orderDataBeans = tradeSLSBRemote.getOrders(userID);
+            }
+
+            output.append("<HR>initTime: " + initTime + "<BR>Hit Count: ").append(hitCount++);
+            output.append("<HR>One to Many CMR access of Account Orders from Account Entity<BR> ");
+            output.append("<HR>User: " + userID + " currently has " + orderDataBeans.size() + " stock orders:");
+            Iterator it = orderDataBeans.iterator();
+            while (it.hasNext()) {
+                OrderDataBean orderData = (OrderDataBean) it.next();
+                output.append("<BR>" + orderData.toHTML());
+            }
+            output.append("</font><HR></body></html>");
+            out.println(output.toString());
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2CMROne2Many.doGet(...): error");
+            // this will send an Error to teh web applications defined error
+            // page.
+            res.sendError(500, "PingServlet2Session2CMROne2Many.doGet(...): error" + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Entity EJB path";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2Many.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,93 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.AccountProfileDataBean;
+
+/**
+ * Primitive to test Entity Container Managed Relationshiop One to One Servlet
+ * will generate a random userID and get the profile for that user using a
+ * {@link trade.Account} Entity EJB This tests the common path of a Servlet
+ * calling a Session to Entity EJB to get CMR One to One data
+ * 
+ */
+
+public class PingServlet2Session2CMROne2One extends HttpServlet {
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+
+        String userID = null;
+
+        StringBuffer output = new StringBuffer(100);
+        output.append("<html><head><title>Servlet2Session2CMROne20ne</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2CMROne2One<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\"><BR>PingServlet2Session2CMROne2One uses the Trade Session EJB"
+                + " to get the profile for a user using an EJB 3.0 CMR one to one relationship");
+        try {
+
+            AccountProfileDataBean accountProfileData = null;
+            int iter = TradeConfig.getPrimIterations();
+            for (int ii = 0; ii < iter; ii++) {
+                userID = TradeConfig.rndUserID();
+                // get the price and print the output.
+                accountProfileData = tradeSLSBRemote.getAccountProfileData(userID);
+            }
+
+            output.append("<HR>initTime: " + initTime + "<BR>Hit Count: ").append(hitCount++);
+            output.append("<HR>One to One CMR access of AccountProfile Information from Account Entity<BR><BR> " + accountProfileData.toHTML());
+            output.append("</font><HR></body></html>");
+            out.println(output.toString());
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2CMROne2One.doGet(...): error");
+            // this will send an Error to teh web applications defined error
+            // page.
+            res.sendError(500, "PingServlet2Session2CMROne2One.doGet(...): error" + e.toString());
+
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Entity EJB path";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2CMROne2One.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,98 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+// import javax.naming.*;
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+
+/**
+ * 
+ * PingServlet2Session2Entity tests key functionality of a servlet call to a
+ * stateless SessionEJB, and then to a Entity EJB representing data in a
+ * database. This servlet makes use of the Stateless Session EJB {@link Trade},
+ * and then uses {@link TradeConfig} to generate a random stock symbol. The
+ * stocks price is looked up using the Quote Entity EJB.
+ * 
+ */
+public class PingServlet2Session2Entity extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        String symbol = null;
+        QuoteDataBean quoteData = null;
+        StringBuffer output = new StringBuffer(100);
+
+        output.append("<html><head><title>PingServlet2Session2Entity</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2Entity<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">" + "PingServlet2Session2Entity tests the common path of a Servlet calling a Session EJB "
+                + "which in turn calls an Entity EJB.<BR>");
+
+        try {
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    symbol = TradeConfig.rndSymbol();
+                    // getQuote will call findQuote which will instaniate the
+                    // Quote Entity Bean
+                    // and then will return a QuoteObject
+                    quoteData = tradeSLSBRemote.getQuote(symbol);
+                }
+            } catch (Exception ne) {
+                Log.error(ne, "PingServlet2Session2Entity.goGet(...): exception getting QuoteData through Trade");
+                throw ne;
+            }
+
+            output.append("<HR>initTime: " + initTime).append("<BR>Hit Count: " + hitCount++);
+            output.append("<HR>Quote Information<BR><BR>" + quoteData.toHTML());
+            out.println(output.toString());
+
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2Entity.doGet(...): General Exception caught");
+            res.sendError(500, "General Exception caught, " + e.toString());
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Session to Entity EJB path";
+
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2Entity.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,106 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.util.Collection;
+import java.util.Iterator;
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.HoldingDataBean;
+
+/**
+ * 
+ * PingServlet2Session2Entity tests key functionality of a servlet call to a
+ * stateless SessionEJB, and then to a Entity EJB representing data in a
+ * database. This servlet makes use of the Stateless Session EJB {@link Trade},
+ * and then uses {@link TradeConfig} to generate a random user. The users
+ * portfolio is looked up using the Holding Entity EJB returnin a collection of
+ * Holdings
+ * 
+ */
+public class PingServlet2Session2EntityCollection extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        String userID = null;
+        Collection holdingDataBeans = null;
+        StringBuffer output = new StringBuffer(100);
+
+        output.append("<html><head><title>PingServlet2Session2EntityCollection</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2EntityCollection<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">"
+                + "PingServlet2Session2EntityCollection tests the common path of a Servlet calling a Session EJB " + "which in turn calls a finder on an Entity EJB returning a collection of Entity EJBs.<BR>");
+
+        try {
+
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    userID = TradeConfig.rndUserID();
+                    // getQuote will call findQuote which will instaniate the
+                    // Quote Entity Bean
+                    // and then will return a QuoteObject
+                    holdingDataBeans = tradeSLSBRemote.getHoldings(userID);
+                    // trade.remove();
+                }
+            } catch (Exception ne) {
+                Log.error(ne, "PingServlet2Session2EntityCollection.goGet(...): exception getting HoldingData collection through Trade for user " + userID);
+                throw ne;
+            }
+
+            output.append("<HR>initTime: " + initTime).append("<BR>Hit Count: " + hitCount++);
+            output.append("<HR>User: " + userID + " is currently holding " + holdingDataBeans.size() + " stock holdings:");
+            Iterator it = holdingDataBeans.iterator();
+            while (it.hasNext()) {
+                HoldingDataBean holdingData = (HoldingDataBean) it.next();
+                output.append("<BR>" + holdingData.toHTML());
+            }
+            out.println(output.toString());
+
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2EntityCollection.doGet(...): General Exception caught");
+            res.sendError(500, "General Exception caught, " + e.toString());
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Session to Entity returning a collection of Entity EJBs";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EntityCollection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,102 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.DirectSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+
+// TODO: fix comments
+/**
+ * 
+ * PingServlet2Session2JDBC tests key functionality of a servlet call to a
+ * stateless SessionEJB, and then to a Entity EJB representing data in a
+ * database. This servlet makes use of the Stateless Session EJB {@link Trade},
+ * and then uses {@link TradeConfig} to generate a random stock symbol. The
+ * stocks price is looked up using the Quote Entity EJB.
+ * 
+ */
+public class PingServlet2Session2JDBC extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private DirectSLSBRemote directSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        String symbol = null;
+        QuoteDataBean quoteData = null;
+        StringBuffer output = new StringBuffer(100);
+
+        output.append("<html><head><title>PingServlet2Session2JDBC</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2JDBC<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">" + "PingServlet2Session2JDBC tests the common path of a Servlet calling a Session EJB "
+                + "which in turn calls JDBC.<BR>");
+
+        try {
+
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    symbol = TradeConfig.rndSymbol();
+                    // getQuote will call findQuote which will instaniate the
+                    // Quote Entity Bean
+                    // and then will return a QuoteObject
+                    quoteData = directSLSBRemote.getQuote(symbol);
+                }
+            } catch (Exception ne) {
+                Log.error(ne, "PingServlet2Session2JDBC.goGet(...): exception getting QuoteData through Trade");
+                throw ne;
+            }
+
+            output.append("<HR>initTime: " + initTime).append("<BR>Hit Count: " + hitCount++);
+            output.append("<HR>Quote Information<BR><BR>" + quoteData.toHTML());
+            out.println(output.toString());
+
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2JDBC.doGet(...): General Exception caught");
+            res.sendError(500, "General Exception caught, " + e.toString());
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Session to Entity EJB path";
+
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBC.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,110 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.util.Collection;
+import java.util.Iterator;
+import javax.naming.*;
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.DirectSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+import org.apache.geronimo.samples.daytrader.HoldingDataBean;
+
+// TODO: Fix comments
+/**
+ * 
+ * PingServlet2Session2Entity tests key functionality of a servlet call to a
+ * stateless SessionEJB, and then to a Entity EJB representing data in a
+ * database. This servlet makes use of the Stateless Session EJB {@link Trade},
+ * and then uses {@link TradeConfig} to generate a random user. The users
+ * portfolio is looked up using the Holding Entity EJB returnin a collection of
+ * Holdings
+ * 
+ */
+public class PingServlet2Session2JDBCCollection extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private DirectSLSBRemote directSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        String userID = null;
+        Collection holdingDataBeans = null;
+        // TradeJDBC trade = null;
+        StringBuffer output = new StringBuffer(100);
+
+        output.append("<html><head><title>PingServlet2Session2JDBCCollection</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2Session2JDBCCollection<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">"
+                + "PingServlet2Session2JDBCCollection tests the common path of a Servlet calling a Session EJB " + "which perform a multi-row JDBC query.<BR>");
+
+        try {
+
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    userID = TradeConfig.rndUserID();
+                    // getQuote will call findQuote which will instaniate the
+                    // Quote Entity Bean
+                    // and then will return a QuoteObject
+                    holdingDataBeans = directSLSBRemote.getHoldings(userID);
+                }
+            } catch (Exception ne) {
+                Log.error(ne, "PingServlet2Session2JDBCCollection.goGet(...): exception getting HoldingData collection through Trade for user " + userID);
+                throw ne;
+            }
+
+            output.append("<HR>initTime: " + initTime).append("<BR>Hit Count: " + hitCount++);
+            output.append("<HR>User: " + userID + " is currently holding " + holdingDataBeans.size() + " stock holdings:");
+            Iterator it = holdingDataBeans.iterator();
+            while (it.hasNext()) {
+                HoldingDataBean holdingData = (HoldingDataBean) it.next();
+                output.append("<BR>" + holdingData.toHTML());
+            }
+            out.println(output.toString());
+
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2Session2JDBCCollection.doGet(...): General Exception caught");
+            res.sendError(500, "General Exception caught, " + e.toString());
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Session to Entity returning a collection of Entity EJBs";
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+
+    }
+}

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2JDBCCollection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java?rev=568223&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java Tue Aug 21 11:15:58 2007
@@ -0,0 +1,99 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.ejb.EJB;
+import org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBRemote;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+import org.apache.geronimo.samples.daytrader.TradeConfig;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+
+/**
+ * 
+ * PingServlet2TwoPhase tests key functionality of a TwoPhase commit In this
+ * primitive a servlet calls a Session EJB which begins a global txn The Session
+ * EJB then reads a DB row and sends a message to JMS Queue The txn is closed w/
+ * a 2-phase commit
+ * 
+ */
+public class PingServlet2TwoPhase extends HttpServlet {
+
+    private static String initTime;
+
+    private static int hitCount;
+
+    @EJB
+    private TradeSLSBRemote tradeSLSBRemote;
+
+    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        doGet(req, res);
+    }
+
+    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+        res.setContentType("text/html");
+        java.io.PrintWriter out = res.getWriter();
+        String symbol = null;
+        QuoteDataBean quoteData = null;
+        StringBuffer output = new StringBuffer(100);
+
+        output.append("<html><head><title>PingServlet2TwoPhase</title></head>" + "<body><HR><FONT size=\"+2\" color=\"#000066\">PingServlet2TwoPhase<BR></FONT>" + "<FONT size=\"-1\" color=\"#000066\">" + "PingServlet2TwoPhase tests the path of a Servlet calling a Session EJB "
+                + "which in turn calls an Entity EJB to read a DB row (quote). The Session EJB " + "then posts a message to a JMS Queue. " + "<BR> These operations are wrapped in a 2-phase commit<BR>");
+
+        try {
+
+            try {
+                int iter = TradeConfig.getPrimIterations();
+                for (int ii = 0; ii < iter; ii++) {
+                    symbol = TradeConfig.rndSymbol();
+                    // getQuote will call findQuote which will instaniate the
+                    // Quote Entity Bean
+                    // and then will return a QuoteObject
+                    quoteData = tradeSLSBRemote.pingTwoPhase(symbol);
+
+                }
+            } catch (Exception ne) {
+                Log.error(ne, "PingServlet2TwoPhase.goGet(...): exception getting QuoteData through Trade");
+                throw ne;
+            }
+
+            output.append("<HR>initTime: " + initTime).append("<BR>Hit Count: " + hitCount++);
+            output.append("<HR>Two phase ping selected a quote and sent a message to TradeBrokerQueue JMS queue<BR>Quote Information<BR><BR>" + quoteData.toHTML());
+            out.println(output.toString());
+
+        } catch (Exception e) {
+            Log.error(e, "PingServlet2TwoPhase.doGet(...): General Exception caught");
+            res.sendError(500, "General Exception caught, " + e.toString());
+        }
+    }
+
+    public String getServletInfo() {
+        return "web primitive, tests Servlet to Session to Entity EJB and JMS -- 2-phase commit path";
+
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        hitCount = 0;
+        initTime = new java.util.Date().toString();
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2TwoPhase.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml?rev=568223&r1=568222&r2=568223&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml Tue Aug 21 11:15:58 2007
@@ -255,9 +255,59 @@
     <servlet>
         <display-name>PingServlet2IncludeRcv</display-name>
         <servlet-name>PingServlet2IncludeRcv</servlet-name>
-        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.PingServlet2IncludeRcv</servlet-class>
+		<servlet-class>org.apache.geronimo.samples.daytrader.web.prims.PingServlet2IncludeRcv</servlet-class>
+	</servlet>
+    
+    <!-- EJB3-based primitives -->
+    
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Entity</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Entity</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session2Entity</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2Entity</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session2EntityCollection</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2EntityCollection</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session2CMROne2One</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2CMROne2One</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session2CMROne2Many</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2CMROne2Many</servlet-class>
     </servlet>
     <servlet>
+        <servlet-name>ejb3.PingServlet2Session2JDBC</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2JDBC</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2Session2JDBCCollection</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2Session2JDBCCollection</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2MDBQueue</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2MDBQueue</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2MDBTopic</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2MDBTopic</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>ejb3.PingServlet2TwoPhase</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.daytrader.web.prims.ejb3.PingServlet2TwoPhase</servlet-class>
+    </servlet>
+
+    <!-- End of EJB3-based primitives -->
+    
+    <servlet>
         <display-name>org_apache_geronimo_samples_daytrader_TradeWSAction</display-name>
         <servlet-name>org_apache_geronimo_samples_daytrader_TradeWSAction</servlet-name>
         <servlet-class>org.apache.geronimo.samples.daytrader.soap.TradeWSAction</servlet-class>
@@ -374,18 +424,67 @@
         <url-pattern>/servlet/PingServlet2MDBTopic</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>PingServlet2JNDI</servlet-name>
-        <url-pattern>/servlet/PingServlet2JNDI</url-pattern>
+		<servlet-name>PingServlet2JNDI</servlet-name>
+		<url-pattern>/servlet/PingServlet2JNDI</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>PingServlet2TwoPhase</servlet-name>
+		<url-pattern>/servlet/PingServlet2TwoPhase</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>PingServlet2Include</servlet-name>
+		<url-pattern>/servlet/PingServlet2Include</url-pattern>
+	</servlet-mapping>
+
+    
+    <!-- EJB3-based primitives -->   
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>PingServlet2TwoPhase</servlet-name>
-        <url-pattern>/servlet/PingServlet2TwoPhase</url-pattern>
+        <servlet-name>ejb3.PingServlet2Entity</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Entity</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>PingServlet2Include</servlet-name>
-        <url-pattern>/servlet/PingServlet2Include</url-pattern>
+        <servlet-name>ejb3.PingServlet2Session2Entity</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2Entity</url-pattern>
     </servlet-mapping>
-
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session2EntityCollection</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2EntityCollection</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session2CMROne2One</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2CMROne2One</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session2CMROne2Many</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2CMROne2Many</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session2JDBC</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2JDBC</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2Session2JDBCCollection</servlet-name>
+        <url-pattern>/ejb3/PingServlet2Session2JDBCCollection</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2MDBQueue</servlet-name>
+        <url-pattern>/ejb3/PingServlet2MDBQueue</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2MDBTopic</servlet-name>
+        <url-pattern>/ejb3/PingServlet2MDBTopic</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ejb3.PingServlet2TwoPhase</servlet-name>
+        <url-pattern>/ejb3/PingServlet2TwoPhase</url-pattern>
+    </servlet-mapping>
+    
+    <!-- End EJB3-based primitives -->
+    
 
     <session-config>
         <session-timeout>30</session-timeout>

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/web_prmtv.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/webapp/web_prmtv.html?rev=568223&r1=568222&r2=568223&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/web_prmtv.html (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/web_prmtv.html Tue Aug 21 11:15:58 2007
@@ -273,6 +273,54 @@
 			These operations are wrapped in a global 2-phase transaction and
 			commit.</FONT></TD>
 		</TR>
+
+        <TR>
+            <TD colspan="2" bgcolor="#c93333" align="center"><B><FONT color="#FFFFFF">EJB 3 Container ping suite</FONT></B></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session"><FONT size="-1">PingServlet2Session</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Stateless Session Remote</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Entity"><FONT size="-1">PingServlet2Entity</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Entity Bean</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2Entity"><FONT size="-1">PingServlet2Session2Entity</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 Entity Bean</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2EntityCollection"><FONT size="-1">PingServlet2Session2EntityCollection</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 Entity Collection</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2CMROne2One"><FONT size="-1">PingServlet2Session2CMROne2One</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 CMR One to One</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2CMROne2Many"><FONT size="-1">PingServlet2Session2CMROne2Many</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 CMR One to Many</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2CMROne2Many"><FONT size="-1">PingServlet2Session2JDBC</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 JDBC</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2Session2JDBCCollection"><FONT size="-1">PingServlet2Session2JDBCCollection</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Session 2 JDBC Collection</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2MDBQueue"><FONT size="-1">PingServlet2MDBQueue</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to MDB Queue</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2MDBTopic"><FONT size="-1">PingServlet2MDBTopic</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to MDB Topic</FONT></TD>
+        </TR>
+        <TR>
+            <TD align="center"><A href="ejb3/PingServlet2TwoPhase"><FONT size="-1">PingServlet2TwoPhase</FONT></A><FONT COLOR="#FF0000">*</FONT></TD>
+            <TD><FONT size="-1">Ping Servlet to Two Phase</FONT></TD>
+        </TR>
 	</TBODY>
 </TABLE>
 </BODY>



Mime
View raw message