geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjbly...@apache.org
Subject svn commit: r518744 [2/3] - in /geronimo/daytrader/branches/ejb3/modules: ejb/ ejb/src/main/java/org/apache/geronimo/samples/daytrader/ ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/ ejb/src/main/java/org/apache/geronimo/samples/daytrade...
Date Thu, 15 Mar 2007 20:06:20 GMT
Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,23 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import org.apache.geronimo.samples.daytrader.ejb3.Accountejb3;
+import java.util.List;
+import javax.ejb.Local;
+
+/**
+ *
+ * @author Rob
+ */
+@Local
+public interface Accountejb3FacadeLocal {
+    void create(Accountejb3 accountejb3);
+
+    void edit(Accountejb3 accountejb3);
+
+    void destroy(Accountejb3 accountejb3);
+
+    Accountejb3 find(Object pk);
+
+    List findAll();
+    
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/Accountejb3FacadeLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,32 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.util.ArrayList;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+
+@Stateful
+public class LocalSFTestBean implements org.apache.geronimo.samples.daytrader.ejb3.prims.LocalSFTestLocal {
+    
+    ArrayList cache;
+    
+    /** Creates a new instance of LocalSFTestBean */
+    public LocalSFTestBean() {
+        cache = new ArrayList();
+    }
+
+    public void addToArrayList(Object o) {
+        cache.add(o);
+    }
+
+    public Object getFirstItemFromArrayList() {
+        if(cache.size()!=0){
+            return cache.get(0);
+        } 
+        return null;
+    }
+    
+    @Remove
+    public void remove(){
+    }   
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,13 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import javax.ejb.Local;
+import javax.ejb.Remove;
+
+@Local
+public interface LocalSFTestLocal {
+    public void addToArrayList(Object o);
+    public Object getFirstItemFromArrayList();
+    @Remove
+    public void remove();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSFTestLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,72 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+
+import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.naming.NamingException;
+
+@Stateless
+public class LocalSLMDBTestBean implements LocalSLMDBTestLocal, LocalSLMDBTestRemote {
+   
+    @Resource(mappedName = "jms/TradeBrokerQCF")
+    private ConnectionFactory queueConnectionFactory;
+    
+    @Resource(mappedName = "jms/TradeBrokerQueue")
+    private Queue tradeBrokerQueue;
+
+    /** Creates a new instance of LocalSLMDBTestBean */
+    public LocalSLMDBTestBean() {
+    }
+    
+    public Message publishToTradeBrokerQueue() {
+        Message message = null;
+        
+        try {
+            message = this.sendJMSMessageToTestMDB("Hello World from TradeBrokerQueue!");
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        
+        return message;
+    }
+    
+    
+    private Message createJMSMessageForTestMDB(Session session, Object messageData) throws JMSException {
+        javax.jms.TextMessage tm = session.createTextMessage();
+        tm.setText(messageData.toString());
+        return tm;
+    }
+    
+    private Message sendJMSMessageToTestMDB(Object messageData) throws NamingException, JMSException {
+        javax.jms.Connection connection = null;
+        javax.jms.Session session = null;
+        
+        Message message = null;
+        
+        try {
+            connection = queueConnectionFactory.createConnection();
+            session = connection.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            message = createJMSMessageForTestMDB(session, messageData);
+            javax.jms.MessageProducer messageProducer = session.createProducer(tradeBrokerQueue);
+            messageProducer.send(message);
+        } finally {
+            if (session != null) {
+                session.close();
+            }
+            if (connection != null) {
+                connection.close();
+            }
+        }
+        
+        return message;
+    } 
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,14 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import javax.ejb.Local;
+import javax.jms.Message;
+
+
+/**
+ * This is the business interface for LocalSLMDBTest enterprise bean.
+ */
+@Local
+public interface LocalSLMDBTestLocal {
+    public Message publishToTradeBrokerQueue();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,14 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import javax.ejb.Remote;
+import javax.jms.Message;
+
+
+/**
+ * This is the business interface for LocalSLMDBTest enterprise bean.
+ */
+@Remote
+public interface LocalSLMDBTestRemote {
+    public Message publishToTradeBrokerQueue();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLMDBTestRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,36 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+/**
+ *
+ * @author jstecher
+ */
+@Stateless
+public class LocalSLTestBean implements LocalSLTestLocal {
+
+    @EJB
+    private RemoteSLTestRemote remoteSLTestBean;
+    private String payload = "Welcome to JEE5 Local SL Beans!";
+    /** Creates a new instance of LocalSLTestBean */
+    public LocalSLTestBean() {
+    }
+
+    public String getPayload() {
+        return payload;
+    }
+
+    public String getPayloadWithParameters(String payload, Integer number, Vector vect, BigDecimal bd) {
+        return this.payload;
+    }
+    
+    public String[] getMultiBeanRemotePayload() {
+        String[] i = new String[2];
+        i[0] = payload;
+        i[1] = remoteSLTestBean.getPayload();
+        return i;
+    }  
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,19 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.Local;
+
+
+/**
+ * This is the business interface for LocalSLTest enterprise bean.
+ */
+@Local
+public interface LocalSLTestLocal {
+    public String getPayload();
+    
+    public String getPayloadWithParameters(String payload, Integer number, Vector vect, BigDecimal bd);
+    
+    public String[] getMultiBeanRemotePayload();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/LocalSLTestLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,55 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import org.apache.geronimo.samples.daytrader.*;
+import java.util.List;
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.LockModeType;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+
+@Stateless
+public class QuoteFacade implements QuoteFacadeLocal {
+
+    @PersistenceContext
+    private EntityManager em;
+    
+    /** Creates a new instance of QuoteDataBeanFacade */
+    public QuoteFacade() {
+    }
+
+    public void create(QuoteDataBean quote) {
+        em.persist(quote);
+    }
+
+    public void edit(QuoteDataBean quote) {
+        em.merge(quote);
+    }
+
+    /*
+     *TODO: why does this entity detach?
+     */
+    public void destroy(QuoteDataBean quote) {
+        QuoteDataBean temp = em.merge(quote);
+        em.remove(temp);
+    }
+
+    public QuoteDataBean find(Object pk) {
+        return (QuoteDataBean) em.find(QuoteDataBean.class, pk);
+    }
+
+    public List findAll() {
+        return em.createQuery("select object(o) from quoteejb as o").getResultList();
+    }
+    
+    public QuoteDataBean testForUpdateQuery(String symbol){
+        Query q = em.createNamedQuery("quoteejb.quoteForUpdate");
+        q.setParameter(1,symbol);
+        QuoteDataBean temp = (QuoteDataBean) q.getResultList().get(0);
+        temp.setCompanyName("test_"+System.currentTimeMillis());
+        return em.merge(temp);
+    }
+    
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,26 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import org.apache.geronimo.samples.daytrader.*;
+import java.util.List;
+import javax.ejb.Local;
+
+/**
+ *
+ * @author Rob
+ */
+@Local
+public interface QuoteFacadeLocal {
+    void create(QuoteDataBean quote);
+
+    void edit(QuoteDataBean quote);
+
+    void destroy(QuoteDataBean quote);
+
+    QuoteDataBean find(Object pk);
+
+    List findAll();
+
+    QuoteDataBean testForUpdateQuery(String symbol);
+    
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/QuoteFacadeLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,32 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.util.ArrayList;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+public class RemoteSFTestBean implements org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSFTestRemote {
+    
+    ArrayList cache;
+    
+    /** Creates a new instance of RemoteSFTestBean */
+    public RemoteSFTestBean() {
+        cache = new ArrayList();
+    }
+
+    public void addToArrayList(Object o) {
+        cache.add(o);
+    }
+
+    public Object getFirstItemFromArrayList() {
+        if(cache.size()!=0){
+            return cache.remove(cache.size()-1);
+        } 
+        return null;
+    }
+    
+    @Remove
+    public void remove(){
+    }
+    
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,17 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import javax.ejb.Remote;
+import javax.ejb.Remove;
+
+
+/**
+ * This is the business interface for RemoteSFTest enterprise bean.
+ */
+@Remote
+public interface RemoteSFTestRemote {
+    public void addToArrayList(Object o);
+    public Object getFirstItemFromArrayList();
+    @Remove
+    public void remove();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSFTestRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,38 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+/**
+ *
+ * @author jstecher
+ */
+@Stateless
+public class RemoteSLTestBean implements RemoteSLTestRemote {
+
+    @EJB
+    private LocalSLTestLocal localSLTestBean;
+    private String payload = "Welcome to JEE5 Remote SL Beans!";
+    
+    /** Creates a new instance of RemoteSLTestBean */
+    public RemoteSLTestBean() {
+    }
+
+    public String getPayload() {
+        return payload;
+    }
+
+    public String getPayloadWithParameters(String payload, Integer number, Vector vect, BigDecimal bd) {
+        return this.payload;
+    }
+
+    public String[] getMultiBeanLocalPayload() {
+        String[] i = new String[2];
+        i[0] = payload;
+        i[1] = localSLTestBean.getPayload();
+        return i;
+    }   
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,19 @@
+
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.Remote;
+
+
+/**
+ * This is the business interface for RemoteSLTest enterprise bean.
+ */
+@Remote
+public interface RemoteSLTestRemote {
+    public String getPayload();
+
+    public String getPayloadWithParameters(String payload, Integer number, Vector vect, BigDecimal bd);
+    
+    public String[] getMultiBeanLocalPayload();
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/RemoteSLTestRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,12 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import org.apache.geronimo.samples.daytrader.*;
+import java.util.Collection;
+
+public class ResultHolder {
+    
+        public AccountDataBean ae;
+        public AccountProfileDataBean ape;
+        public Collection<HoldingDataBean> holdings;
+    
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/ResultHolder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,21 @@
+package org.apache.geronimo.samples.daytrader.ejb3.prims;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+@MessageDriven(mappedName = "jms/TradeBrokerQueue", activationConfig =  {
+        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
+        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
+    })
+public class TestMDB implements MessageListener {
+    
+    /** Creates a new instance of TradeTestMDB */
+    public TestMDB() {
+    }
+
+    public void onMessage(Message message) {
+        System.out.println("TestMDB.onMessage: " + message.toString());
+    }
+}

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/prims/TestMDB.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/daytrader/branches/ejb3/modules/ejb/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/ejb/src/main/resources/META-INF/persistence.xml?view=diff&rev=518744&r1=518743&r2=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/ejb/src/main/resources/META-INF/persistence.xml (original)
+++ geronimo/daytrader/branches/ejb3/modules/ejb/src/main/resources/META-INF/persistence.xml Thu Mar 15 13:06:17 2007
@@ -21,6 +21,7 @@
 
 
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <jta-data-source>jdbc/TradeDataSource</jta-data-source>
         <class>org.apache.geronimo.samples.daytrader.AccountDataBean</class>
         <class>org.apache.geronimo.samples.daytrader.AccountProfileDataBean</class>
         <class>org.apache.geronimo.samples.daytrader.HoldingDataBean</class>
@@ -31,6 +32,7 @@
             <property name="openjpa.jdbc.DBDictionary" value="org.apache.openjpa.jdbc.sql.DerbyDictionary"/>
             <!--<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>-->
             <!--<property name="openjpa.Sequence" value="table(Table=OPENJPASEQ, Increment=100)"/>-->
+            <!--<property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>-->
         </properties>
     </persistence-unit>
 </persistence>

Modified: geronimo/daytrader/branches/ejb3/modules/web/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/pom.xml?view=diff&rev=518744&r1=518743&r2=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/pom.xml (original)
+++ geronimo/daytrader/branches/ejb3/modules/web/pom.xml Thu Mar 15 13:06:17 2007
@@ -73,6 +73,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <scope>provided</scope>
+            <version>1.1-M1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jsp_2.0_spec</artifactId>
             <scope>provided</scope>
         </dependency>
@@ -86,6 +92,24 @@
             <artifactId>geronimo-jpa_3.0_spec</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>1.0-M1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+    		<groupId>org.apache.geronimo.specs</groupId>
+    		<artifactId>geronimo-annotation_1.0_spec</artifactId>
+    		<version>1.0-M1</version>
+    		<scope>provided</scope>
+		</dependency>
         <!-- Removed per DAYTRADER-7 due to interop issues on commercial AppServers 
         <dependency>
             <groupId>org.codehaus.mojo</groupId>

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteCreate.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteCreate.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteCreate.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteCreate.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,89 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.LocalSFTestLocal;
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSFTestRemote;
+import java.io.*;
+import javax.ejb.EJB;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+//@EJB (beanInterface=LocalSFTestLocal.class, beanName="LocalSFTestBean", name="SFTestLocal")
+public class PingSFSessionRemoteCreate extends HttpServlet {
+
+    String payload = "JEE is cool";
+    static String html1 = "<html><head><title>Servlet PingSFSessionLocalCreate</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSFSessionLocalCreate</h1>";
+    static String html2 = "</body></html>";
+    
+    
+    private RemoteSFTestRemote getSFBean(HttpServletRequest request, HttpServletResponse response) throws NamingException{
+        HttpSession sess = request.getSession(true);
+        RemoteSFTestRemote SFBean = (RemoteSFTestRemote)sess.getAttribute("SFSessionRef");
+        if(SFBean==null){
+            // Get the initial JNDI context.
+            Context ctx = new InitialContext();
+            SFBean = (RemoteSFTestRemote) ctx.lookup(RemoteSFTestRemote.class.getName());
+            sess.setAttribute("SFSessionRef", SFBean);
+        }
+        return SFBean;
+    }
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        RemoteSFTestRemote remoteSFTestBean;
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        
+        out.println(html1);
+        
+        try{
+            remoteSFTestBean = getSFBean(request, response);
+            remoteSFTestBean.addToArrayList(payload);
+            out.println(payload);
+        }catch(Exception e){
+            System.out.println(e.toString());
+            out.println("Failure in Primitive call!\n\n" + e.toString());
+        }    
+
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteRemove.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteRemove.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteRemove.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteRemove.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,81 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSFTestRemote;
+import java.io.*;
+import java.net.*;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSFSessionRemoteRemove extends HttpServlet {
+    
+    public static String payload = "Stateful Session Removed";
+    static String html1 = "<html><head><title>Servlet PingSFSessionLocalRemove</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSFSessionLocalRemove</h1>";
+    static String html2 = "</body></html>";
+    
+    
+    private void removeSFBean(HttpServletRequest request, HttpServletResponse response){
+        HttpSession sess = request.getSession(false);
+        RemoteSFTestRemote SFBean;
+        if(sess!=null){
+            SFBean = (RemoteSFTestRemote)sess.getAttribute("SFSessionRef");
+            SFBean.remove();
+            sess.invalidate();
+        }
+    }
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        RemoteSFTestRemote remoteSFTestBean;
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        
+        out.println(html1);
+        
+        try{
+            removeSFBean(request, response);
+            out.println(payload);
+        }catch(Exception e){
+            System.out.println(e.toString());
+            out.println("Stateful Session Bean not created or Failure in Primitive call!\n\n" + e.toString());
+        }    
+
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteUpdate.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteUpdate.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteUpdate.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSFSessionRemoteUpdate.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,104 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSFTestRemote;
+import java.io.*;
+import java.util.Random;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSFSessionRemoteUpdate extends HttpServlet {
+
+    @EJB
+    private RemoteSFTestRemote remoteSFTestBean;
+    Random rn = new Random();
+    static String payload1 = "Update One:  JEE is extemely fun";
+    static String payload2 = "Update Two:  JEE is truly fun";
+    static String html1 = "<html><head><title>Servlet PingSFSessionLocalUpdate</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSFSessionLocalUpdate</h1>";
+    static String html2 = "</body></html>";
+    
+    
+    private RemoteSFTestRemote getSFBean(HttpServletRequest request, HttpServletResponse response){
+        HttpSession sess = request.getSession(false);
+        RemoteSFTestRemote SFBean;
+        if(sess!=null){
+            SFBean = (RemoteSFTestRemote)sess.getAttribute("SFSessionRef");
+        }else{
+            SFBean = null;
+        }
+        return SFBean;
+    }
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        double randomNumber = rn.nextDouble();
+        double randomNumberMessage = rn.nextDouble();
+        
+        out.println(html1);
+        
+        try{
+            //Need to think about business logic here so that its add, remove evenly.
+            remoteSFTestBean = getSFBean(request, response);
+            if(remoteSFTestBean!=null){
+                if(randomNumber <= 0.50d){
+                    out.println((String)remoteSFTestBean.getFirstItemFromArrayList());
+                }else{
+                    if(randomNumberMessage <= 0.50d){
+                        remoteSFTestBean.addToArrayList(payload1);
+                        out.println(payload1);
+                    }else{
+                        remoteSFTestBean.addToArrayList(payload2);
+                        out.println(payload2);
+                    } 
+                }
+            }else{
+                out.println("Stateful Session Bean was not created or an error occured and it was null");
+            }
+            
+        }catch(Exception e){
+            System.out.println(e.toString());
+            out.println("Failure in Primitive call!\n\n" + e.toString());
+        }
+        
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,65 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.LocalSLTestLocal;
+
+import java.io.*;
+import java.net.*;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionLocal extends HttpServlet {
+    //@EJB (beanName="LocalSLTestBean")
+    //private LocalSLTestLocal localSLTestBean;
+    
+    @EJB
+    private LocalSLTestLocal localSLTestBean;
+    static String html1 = "<html><head><title>Servlet PingSLSessionLocal</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionLocal</h1>";
+    static String html2 = "</body></html>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        out.println(html1);
+        out.println(localSLTestBean.getPayload());
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal2SLSessionRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal2SLSessionRemote.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal2SLSessionRemote.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocal2SLSessionRemote.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,66 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.LocalSLTestLocal;
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSLTestRemote;
+import java.io.*;
+import java.net.*;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionLocal2SLSessionRemote extends HttpServlet {
+
+    @EJB
+    private LocalSLTestLocal localSLTestBean;
+    static String html1 = "<html><head><title>Servlet PingSLSessionLocal2SLSessionRemote</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionLocal2SLSessionRemote</h1>";
+    static String html2 = "</body></html>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        String i[] = localSLTestBean.getMultiBeanRemotePayload();
+        out.println(html1);
+        out.println(i[0]);
+        out.println("<br>");
+        out.println(i[1]);
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocalWithParameters.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocalWithParameters.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocalWithParameters.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionLocalWithParameters.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,67 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.LocalSLTestLocal;
+import java.io.*;
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionLocalWithParameters extends HttpServlet {
+
+    @EJB
+    private LocalSLTestLocal localSLTestBean;
+    private Integer number = new Integer(6);
+    private Vector vect = new Vector(10);
+    private BigDecimal bd = new BigDecimal(0.1112); 
+    private String payload = "This is a test string payload";
+    static String html1 = "<html><head><title>Servlet PingSLSessionLocalWithParameters</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionLocalWithParameters</h1>";
+    static String html2 = "</body></html>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        out.println(html1);
+        out.println(localSLTestBean.getPayloadWithParameters(payload, number, vect, bd));
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,63 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSLTestRemote;
+import java.io.*;
+import java.net.*;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionRemote extends HttpServlet {
+
+    static String html1 = "<html><head><title>Servlet PingSLSessionRemote</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionRemote</h1>";
+    static String html2 = "</body></html>";
+    
+    @EJB
+    private RemoteSLTestRemote remoteSLTestBean;
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        out.println(html1);
+        out.println(remoteSLTestBean.getPayload());
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote2SLSessionLocal.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote2SLSessionLocal.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote2SLSessionLocal.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemote2SLSessionLocal.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,66 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSLTestRemote;
+import java.io.*;
+import java.net.*;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionRemote2SLSessionLocal extends HttpServlet {
+    
+    @EJB
+    private RemoteSLTestRemote remoteSLTestBean;
+    static String html1 = "<html><head><title>Servlet PingSLSessionRemote2SLSessionLocal</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionRemote2SLSessionLocal</h1>";
+    static String html2 = "</body></html>";
+    
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        String i[] = remoteSLTestBean.getMultiBeanLocalPayload();
+        out.println(html1);
+        out.println(i[0]);
+        out.println("<br>");
+        out.println(i[1]);
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemoteWithParameters.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemoteWithParameters.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemoteWithParameters.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingSLSessionRemoteWithParameters.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,68 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.RemoteSLTestRemote;
+import java.io.*;
+import java.math.BigDecimal;
+import java.util.Vector;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author jstecher
+ * @version
+ */
+public class PingSLSessionRemoteWithParameters extends HttpServlet {
+
+    @EJB
+    private RemoteSLTestRemote remoteSLTestBean;
+    private Integer number = new Integer(6);
+    private Vector vect = new Vector(10);
+    private BigDecimal bd = new BigDecimal(0.1112); 
+    private String payload = "This is a test string payload";
+    static String html1 = "<html><head><title>Servlet PingSLSessionRemoteWithParameters</title><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><h1>Servlet PingSLSessionRemoteWithParameters</h1>";
+    static String html2 = "</body></html>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        out.println(html1);
+        out.println(remoteSLTestBean.getPayloadWithParameters(payload, number, vect, bd));
+        out.println(html2);
+        out.close();
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBCreate.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBCreate.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBCreate.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBCreate.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,90 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.QuoteFacadeLocal;
+import org.apache.geronimo.samples.daytrader.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+import java.io.*;
+import java.math.BigDecimal;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author Rob
+ * @version
+ */
+public class PingServlet2Session2EJBCreate extends HttpServlet {
+    
+    @EJB
+    private QuoteFacadeLocal quoteFacade; 
+    
+    private static String header = "<HTML><HEAD><TITLE>EJB3 Primitives - PingServlet2Session2EJBCreate</TITLE><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></HEAD><BODY><H3>PingServlet2Session2EJBCreate</H3><BR>\n<TABLE class=\"table_1\"><TR class=\"row_1\"><TD>Created Quotes:</TD></TR>";
+    private static String footer = "</TABLE>\n</BODY></HTML>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        PrintWriter out = response.getWriter();        
+                response.setContentType("text/html;charset=UTF-8");
+
+		out.println(header);
+		int iterations = StaticUtils.getIterations(request);
+                String prefix = StaticUtils.getQuotePrefix(request);
+		
+		for (int i = 0; i < iterations; i++){			
+                        QuoteDataBean quote = new QuoteDataBean(prefix + ':' + i);
+                        
+                        BigDecimal p1 = StaticUtils.getRandomBigDecimal(50);
+                        BigDecimal p2 = StaticUtils.getRandomBigDecimal(50);
+                        quote.setOpen(p1);
+                        quote.setPrice(p2);
+                        if (p1.compareTo(p2) < 0){
+                            quote.setLow(p1);
+                            quote.setHigh(p2);
+                        } else {
+                            quote.setLow(p2);
+                            quote.setHigh(p1);
+                        }
+                        quote.setVolume(StaticUtils.getRandomDouble(10000));
+                        quote.setChange(StaticUtils.getRandomDouble(100));
+                        quote.setCompanyName(prefix + ':' + i);
+                        
+                        quoteFacade.create(quote);
+                                        
+			out.println("<TR class=\"row_2\"><TD>" + quote.getSymbol() + "</TD></TR>");
+			
+		}
+		out.println(footer);
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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

Added: geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBDestroy.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBDestroy.java?view=auto&rev=518744
==============================================================================
--- geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBDestroy.java (added)
+++ geronimo/daytrader/branches/ejb3/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ejb3/PingServlet2Session2EJBDestroy.java Thu Mar 15 13:06:17 2007
@@ -0,0 +1,82 @@
+package org.apache.geronimo.samples.daytrader.web.prims.ejb3;
+
+import org.apache.geronimo.samples.daytrader.ejb3.prims.QuoteFacadeLocal;
+import org.apache.geronimo.samples.daytrader.QuoteDataBean;
+import java.io.*;
+import java.math.BigDecimal;
+import javax.ejb.EJB;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ *
+ * @author Rob
+ * @version
+ */
+public class PingServlet2Session2EJBDestroy extends HttpServlet {
+    
+    @EJB
+    private QuoteFacadeLocal quoteFacade; 
+    
+    private static String header = "<HTML><HEAD><TITLE>EJB3 Primitives - PingServlet2Session2EJBDestroy</TITLE><LINK href=\"prim.css\" rel=\"stylesheet\" type=\"text/css\" /></HEAD><BODY><H3>PingServlet2Session2EJBDestroy</H3><BR>\n<TABLE class=\"table_1\"><TR class=\"row_1\"><TD>Destroyed Quotes:</TD></TR>";
+    private static String footer = "</TABLE>\n</BODY></HTML>";
+    
+    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        PrintWriter out = response.getWriter();        
+                response.setContentType("text/html;charset=UTF-8");
+
+		out.println(header);
+		int iterations = StaticUtils.getIterations(request);
+                String prefix = StaticUtils.getQuotePrefix(request);
+		
+		for (int i = 0; i < iterations; i++){			
+                        String quoteSymbol = prefix + ':' + i;
+                        
+                        /*quoteejbFacade.findAndRemove(quoteSymbol);
+                        out.println("<TR class=\"row_2\"><TD>" + quoteSymbol + "</TD></TR>");                        */
+                        
+                        QuoteDataBean quote = quoteFacade.find(quoteSymbol);
+                        
+                        if (quote != null){
+                            quoteFacade.destroy(quote);
+                            out.println("<TR class=\"row_2\"><TD>" + quote.getSymbol() + "</TD></TR>");
+                        } else {
+                            out.println("<TR class=\"row_2\"><TD>" + quote.getSymbol() + " NOT FOUND</TD></TR>");
+                        }
+			
+		}
+		out.println(footer);
+    }
+    
+    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
+    /** Handles the HTTP <code>GET</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Handles the HTTP <code>POST</code> method.
+     * @param request servlet request
+     * @param response servlet response
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+    
+    /** Returns a short description of the servlet.
+     */
+    public String getServletInfo() {
+        return "Short description";
+    }
+    // </editor-fold>
+}

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

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

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



Mime
View raw message