geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecr...@apache.org
Subject svn commit: r636529 [5/15] - in /geronimo/samples/branches/1.0: ./ migration-ejb-bmp/ migration-ejb-bmp/dd/ migration-ejb-bmp/dd/META-INF/ migration-ejb-bmp/jndi/ migration-ejb-bmp/src/ migration-ejb-bmp/src/com/ migration-ejb-bmp/src/com/ibm/ migratio...
Date Wed, 12 Mar 2008 21:56:03 GMT
Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/jboss.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/jboss.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/jboss.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml Wed Mar 12 14:54:41 2008
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<openejb-jar
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
+    xmlns:security="http://geronimo.apache.org/xml/ns/security"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
+    configId="geronimo/SessionBeanDemo/1.0/car" parentId="geronimo/j2ee-server/1.0/car">
+ <enterprise-beans>
+    
+    <entity>
+        <ejb-name>CustomerEJB</ejb-name>
+        <jndi-name>CustomerHomeRemote</jndi-name>
+        <local-jndi-name></local-jndi-name>
+        <resource-ref>
+            <ref-name>jdbc/ibm-demo</ref-name>
+            <resource-link>SystemDatasource</resource-link>
+        </resource-ref>
+    </entity>
+    
+    <session>
+        <ejb-name>LoanManagerEJB</ejb-name>
+        <jndi-name>LoanManagerHomeRemote</jndi-name>
+        <ejb-ref>
+            <ref-name>ejb/CustomerHomeRemote</ref-name>
+            <ejb-link>CustomerEJB</ejb-link>
+        </ejb-ref>        
+   </session>
+    
+    <session>
+        <ejb-name>StatefulLoanManagerEJB</ejb-name>
+        <jndi-name>StatefulLoanManagerHomeRemote</jndi-name>
+        <ejb-ref>
+            <ref-name>ejb/CustomerHomeRemote</ref-name>
+            <ejb-link>CustomerEJB</ejb-link>
+        </ejb-ref>        
+   </session>
+   
+ </enterprise-beans>
+    
+</openejb-jar>
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/dd/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties Wed Mar 12 14:54:41 2008
@@ -0,0 +1,30 @@
+# 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.
+
+####################################################################
+### JBoss Settings
+####################################################################
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=localhost
+
+
+####################################################################
+### Geronimo Settings
+####################################################################
+#java.naming.factory.initial=org.openejb.client.RemoteInitialContextFactory
+#java.naming.provider.url=localhost:4201
+#java.naming.security.principal=username
+#java.naming.security.credentials=passwd

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/jndi/jndi.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/maven.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/maven.xml?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/maven.xml (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/maven.xml Wed Mar 12 14:54:41 2008
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project default="ejb:ejb"
+    xmlns:j="jelly:core"
+    xmlns:u="jelly:util"
+    xmlns:ant="jelly:ant">
+    
+    <!-- needed goals:
+            - deploy jar to jboss
+            - run client (include starting and stopping jboss)
+            - clean everything (include undeploy from jboss)
+    -->
+    <j:set var="deploydir" value="${maven.jboss.home}/server/default/deploy"/>
+    
+    <ant:path id="jboss.client.classpath">
+        <fileset dir="${maven.jboss.home}/client">
+            <include name="**/*.jar"/>
+        </fileset>
+        <ant:path refid="maven.dependency.classpath"/>
+        <ant:pathelement path="${maven.build.dest}"/>
+        <ant:pathelement location="jndi"/>
+    </ant:path>
+    
+    <ant:path id="geronimo.client.classpath">
+        <fileset dir="${maven.geronimo.home}/lib">
+            <include name="**/*.jar"/>
+        </fileset>
+        <!-- <ant:path refid="maven.dependency.classpath"/> -->
+        
+        <ant:pathelement path="${maven.build.dest}"/>
+        <ant:pathelement location="jndi"/>
+        <ant:pathelement path="${maven.geronimo.home}/repository/openejb/jars/openejb-core-2.0.jar"/>
+    <ant:pathelement path="${maven.geronimo.home}/repository/org.apache.geronimo.specs/jars/geronimo-ejb_2.1_spec-1.0.jar"/>
+    <ant:pathelement path="${maven.geronimo.home}/repository/org.apache.geronimo.specs/jars/geronimo-servlet_2.4_spec-1.0.jar"/>
+    <ant:pathelement path="${maven.geronimo.home}/repository/org.apache.geronimo.specs/jars/geronimo-j2ee_1.4_spec-1.0.jar"/>
+        <ant:pathelement path="${maven.geronimo.home}/repository/geronimo/jars/geronimo-security-1.0.jar"/> 
+    </ant:path>
+    
+    <goal name="jboss:deploy" prereqs="ejb:ejb,war:war">
+        <ant:echo>Deploying to JBoss......</ant:echo>
+        <copy overwrite="true" 
+            file="target/${maven.final.name}.jar"
+            todir="${deploydir}"/>  
+        <copy overwrite="true" 
+            file="target/${maven.war.final.name}"
+            todir="${deploydir}"/>
+    </goal>
+    
+    <goal name="geronimo:deploy" prereqs="ejb:ejb,war:war">
+        <ant:echo>Deploying to Geronimo......</ant:echo>
+        <ant:java fork="true" jar="${maven.geronimo.home}/bin/deployer.jar" failonerror="true">
+            <ant:arg value="--user"/>
+            <ant:arg value="system"/>
+            <ant:arg value="--password"/>
+            <ant:arg value="manager"/>
+            <ant:arg value="deploy"/>
+            <ant:arg value="$target/${maven.final.name}.jar"/>
+        </ant:java>
+    <ant:java fork="true" jar="${maven.geronimo.home}/bin/deployer.jar" failonerror="true">
+            <ant:arg value="--user"/>
+            <ant:arg value="system"/>
+            <ant:arg value="--password"/>
+            <ant:arg value="manager"/>
+            <ant:arg value="deploy"/>
+            <ant:arg value="$target/${maven.war.final.name}"/>
+        </ant:java>
+    </goal>
+    
+    <goal name="run:stateful">
+        <!--<attainGoal name="jboss:start"/>-->
+        <ant:java classname="com.ibm.demo.client.StatefulClient"
+            fork="true"
+            failonerror="true"
+            classpathref="jboss.client.classpath">
+        </ant:java>
+        <!--<attainGoal name="jboss:stop"/>-->
+    </goal>
+    
+    <goal name="run:stateless">
+        <!--<attainGoal name="jboss:start"/>-->
+        <ant:java classname="com.ibm.demo.client.StatelessClient"
+            fork="true"
+            failonerror="true"
+            classpathref="jboss.client.classpath"/>
+        <!--<attainGoal name="jboss:stop"/>-->
+    </goal>
+    
+    <goal name="run-g:stateful">
+        <ant:echo>Getting Classpath.....</ant:echo>
+        <ant:echo>${geronimo.client.classpath}</ant:echo>
+        <!--<attainGoal name="jboss:start"/>-->
+        <ant:java classname="com.ibm.demo.client.StatefulClient"
+            fork="true"
+            failonerror="true"
+            classpathref="geronimo.client.classpath">
+        </ant:java>
+        <!--<attainGoal name="jboss:stop"/>-->
+    </goal>
+    
+    <goal name="run-g:stateless">
+        <!--<attainGoal name="jboss:start"/>-->
+        <ant:java classname="com.ibm.demo.client.StatelessClient"
+            fork="true"
+            failonerror="true"
+            classpathref="geronimo.client.classpath"/>
+        <!--<attainGoal name="jboss:stop"/>-->
+    </goal>
+    
+    <postGoal name="clean">
+        <delete file="${deploydir}/${maven.final.name}.jar"/>
+        <delete file="${deploydir}/${maven.war.final.name}"/>
+    </postGoal>
+
+</project>
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/maven.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/maven.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/1.0/migration-ejb-session/project.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/project.properties?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/project.properties (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/project.properties Wed Mar 12 14:54:41 2008
@@ -0,0 +1,24 @@
+# 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.
+
+maven.ejb.includes=com/ibm/demo/entity/**, com/ibm/demo/session/**
+maven.ejb.excludes=com/ibm/demo/client/**
+maven.ejb.src=dd
+
+maven.war.classes.excludes=com/ibm/demo/entity/**, com/ibm/demo/session/**
+maven.war.classes.includes=com/ibm/demo/client/**
+
+maven.jboss.home=C:/jboss-4.0.2
+maven.geronimo.home=C:/geronimo-1.0
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/project.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/project.xml?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/project.xml (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/project.xml Wed Mar 12 14:54:41 2008
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+    
+    <pomVersion>3</pomVersion>
+
+    <artifactId>session-ejb</artifactId>
+    <name>SessionEJB</name>
+    <groupId>ejbdemo</groupId>
+    <currentVersion>1.0</currentVersion>
+    
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_2.1_spec</artifactId>
+            <version>1.0</version>
+            <type>jar</type>
+        </dependency>
+       
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.4_spec</artifactId>
+            <version>1.0</version>
+            <type>jar</type>
+        </dependency>
+    
+            <dependency>
+        <groupId>openejb</groupId>
+        <artifactId>openejb-core</artifactId>
+            <version>2.0</version>
+            <type>jar</type>
+        </dependency>
+    
+        <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-j2ee_1.4_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+    
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-security</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/project.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,118 @@
+/*
+* 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 com.ibm.demo.client;
+
+import java.io.*;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.Random;
+
+import javax.ejb.CreateException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+
+import com.ibm.demo.session.stateful.StatefulLoanManagerHomeRemote;
+import com.ibm.demo.session.stateful.StatefulLoanManagerRemote;
+
+public class StatefulClient {
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+
+        Integer id = new Integer(0);
+        String name = "";
+        String sssNo = "";
+        String address = "";
+        Date birthdate = new Date();
+        Double annualSalary = new Double(0.0);
+        Double loanAmount = new Double(0.0);
+
+        int startPK = 0;
+        StatefulLoanManagerRemote loanmanager = null;
+        Random generator = new Random();
+
+        try{
+            Context jndiContext = new InitialContext();
+            Object ref = jndiContext.lookup("StatefulLoanManagerHomeRemote");
+            StatefulLoanManagerHomeRemote home = (StatefulLoanManagerHomeRemote)
+                                          PortableRemoteObject.narrow(ref, StatefulLoanManagerHomeRemote.class);
+            loanmanager = home.create();
+
+        } catch(CreateException ce){
+            ce.printStackTrace();
+        } catch(RemoteException re){
+            re.printStackTrace();
+        } catch(NamingException ne){
+            ne.printStackTrace();
+        }
+
+
+        //System.out.println("Please enter loan details:");
+
+        try{
+
+            startPK = loanmanager.getMaxPK();
+
+        } catch (RemoteException re){
+            re.printStackTrace();
+        }
+        for(int i=startPK + 1;i<startPK + generator.nextInt(14) + 1;i++){
+            id = new Integer(i);
+            name = "Customer" + i;
+            address = "Address" + i;
+            sssNo = "SSS:" + i;
+            birthdate = new Date();
+            annualSalary = new Double(generator.nextDouble() * 150000.0 + 20000.0);
+            loanAmount = new Double(generator.nextDouble() * 1000000.0 + 50000.0);
+
+            try{
+                loanmanager.submitLoanApplication(id, name, address, birthdate, sssNo, annualSalary, loanAmount);
+                System.out.println("Submitting new loan application...");
+                System.out.println("-> submit count is now = " + loanmanager.getSubmitCount());
+            }catch (RemoteException re){
+                re.printStackTrace();
+            }
+        }
+
+        try{
+            System.out.println(loanmanager.getSubmitCount() + " loan applications were submitted.");
+        }catch(RemoteException re){
+            re.printStackTrace();
+        }
+    }
+
+    public static String getInput(){
+        // open up standard input
+        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+
+        String input = null;
+        // read the user input from the command-line; need to use try/catch with the
+        // readLine() method
+        try {
+            input = br.readLine();
+        }catch (IOException ioe) {
+            System.out.println("IO error trying to read your input!");
+            System.exit(1);
+        }
+        return input;
+    }
+
+}

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,132 @@
+/*
+* 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 com.ibm.demo.client;
+
+import java.io.*;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.Random;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
+
+import javax.ejb.CreateException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+
+import com.ibm.demo.session.stateful.StatefulLoanManagerHomeRemote;
+import com.ibm.demo.session.stateful.StatefulLoanManagerRemote;
+
+
+public class StatefulClientServlet extends HttpServlet {
+    
+    private ServletContext ctx;
+    private int submitCount = 0;
+    
+    private StatefulLoanManagerRemote loanmanager;
+
+    public void init() throws ServletException {
+
+            this.ctx = getServletContext(); 
+            loanmanager = null;
+            
+            try{
+                Context jndiContext = new InitialContext();   
+                Object ref = jndiContext.lookup("java:/comp/env/ejb/StatefulLoanManagerHomeRemote");   
+                StatefulLoanManagerHomeRemote home = (StatefulLoanManagerHomeRemote)
+                                              PortableRemoteObject.narrow(ref, StatefulLoanManagerHomeRemote.class);
+
+                loanmanager = home.create();
+            
+            } catch(CreateException ce){
+                ce.printStackTrace();
+            } catch(RemoteException re){
+                re.printStackTrace();
+            } catch(NamingException ne){
+                ne.printStackTrace();
+            } catch(Exception e) {
+                e.printStackTrace();
+                throw new ServletException(e);
+            }
+            
+            
+    }
+
+    public void destroy() {
+
+    }
+
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        doGet(request, response);
+    }
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        
+        Integer id = new Integer(0);
+        String name = "";
+        String sssNo = "";
+        String address = "";
+        Date birthdate = new Date();
+        Double annualSalary = new Double(0.0);
+        Double loanAmount = new Double(0.0);
+        
+        int startPK = 0;
+
+        Random generator = new Random();
+        
+        try{
+            startPK = loanmanager.getMaxPK();
+        } catch (RemoteException re){
+            re.printStackTrace();
+        }
+        for(int i=startPK + 1;i<startPK + generator.nextInt(14) + 1;i++){
+            id = new Integer(i);
+            name = "Customer" + i;
+            address = "Address" + i;
+            sssNo = "SSS:" + i;
+            birthdate = new Date();
+            annualSalary = new Double(generator.nextDouble() * 150000.0 + 20000.0);
+            loanAmount = new Double(generator.nextDouble() * 1000000.0 + 50000.0);
+            
+            try{
+                loanmanager.submitLoanApplication(id, name, address, birthdate, sssNo, annualSalary, loanAmount);
+                System.out.println("Submitting new loan application...");
+                System.out.println("-> submit count is now = " + loanmanager.getSubmitCount());
+            }catch (RemoteException re){
+                re.printStackTrace();
+            }
+        }
+        
+        try{
+            submitCount = loanmanager.getSubmitCount();
+        }catch (RemoteException re){
+            re.printStackTrace();
+        }
+        
+        request.setAttribute("count", new Integer(submitCount).toString());
+
+        ctx.getRequestDispatcher("/stateful.jsp").include(request, response);
+    }
+        
+}

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatefulClientServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,73 @@
+/*
+* 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 com.ibm.demo.client;
+
+import com.ibm.demo.session.stateless.LoanManagerHomeRemote;
+import com.ibm.demo.session.stateless.LoanManagerRemote;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.ejb.CreateException;
+import javax.rmi.PortableRemoteObject;
+
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Iterator;
+
+/**
+ * @author hisidro
+ *
+ */
+public class StatelessClient {
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+        
+        try{
+            Context jndiContext = new InitialContext();   
+            Object ref = jndiContext.lookup("LoanManagerHomeRemote");   
+            LoanManagerHomeRemote home = (LoanManagerHomeRemote)
+                                          PortableRemoteObject.narrow(ref, LoanManagerHomeRemote.class);
+
+            LoanManagerRemote loanmanager = home.create();
+        
+            // Get a list of all denied loans
+            List deniedLoans = loanmanager.deniedLoans();
+            
+            if(deniedLoans!=null){
+                //CustomerRemote customer = null;
+                String customer = new String();
+                System.out.println("Customers with denied loan applications:");
+                for(Iterator i = deniedLoans.iterator();i.hasNext();){
+                    customer = (String) i.next();
+                    System.out.println("- " + customer);
+                }
+            }else{
+                System.out.println("There are no denied loans in the database.");
+            }
+        } catch(CreateException ce){
+            ce.printStackTrace();
+        } catch(RemoteException re){
+            re.printStackTrace();
+        } catch(NamingException ne){
+            ne.printStackTrace();
+        }
+    }
+}

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,97 @@
+/*
+* 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 com.ibm.demo.client;
+
+import com.ibm.demo.session.stateless.LoanManagerHomeRemote;
+import com.ibm.demo.session.stateless.LoanManagerRemote;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.ejb.CreateException;
+import javax.rmi.PortableRemoteObject;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author hisidro
+ *
+ */
+public class StatelessClientServlet extends HttpServlet {
+    
+    private ServletContext ctx;
+    private List deniedLoans = new ArrayList();
+    private LoanManagerRemote loanmanager;
+    
+    public void init() throws ServletException {
+        try{
+            this.ctx = getServletContext();
+            
+            Context jndiContext = new InitialContext();   
+            Object ref = jndiContext.lookup("java:/comp/env/ejb/LoanManagerHomeRemote");   
+            LoanManagerHomeRemote home = (LoanManagerHomeRemote)
+                                          PortableRemoteObject.narrow(ref, LoanManagerHomeRemote.class);
+
+            loanmanager = home.create();
+            
+        } catch(CreateException ce){
+            ce.printStackTrace();
+        } catch(RemoteException re){
+            re.printStackTrace();
+        } catch(NamingException ne){
+            ne.printStackTrace();
+        } catch(Exception e) {
+            e.printStackTrace();
+            throw new ServletException(e);
+        }
+    }
+
+    public void destroy() {
+
+    }
+
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        doGet(request, response);
+    }
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        
+        // Get a list of all denied loans
+        deniedLoans = loanmanager.deniedLoans();
+        
+        if(deniedLoans==null){
+            System.out.println("No denied loans");
+            deniedLoans.add("No denied loan applications.");
+        }
+        
+        request.setAttribute("customers", deniedLoans);
+
+        ctx.getRequestDispatcher("/stateless.jsp").include(request, response);
+    }
+    
+}

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/client/StatelessClientServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,501 @@
+/*
+* 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.
+*/
+/*
+ * Created on Sep 26, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package com.ibm.demo.entity;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Date;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+import javax.ejb.FinderException;
+import javax.ejb.ObjectNotFoundException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+/**
+ * @author cpineda
+ * 
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+public class CustomerBean implements EntityBean {
+
+    public Integer id;
+
+    public String name;
+
+    public String address;
+
+    public Date birthdate;
+
+    public String sssNo;
+
+    public Double annualSalary;
+
+    public Double loanAmount;
+
+    public EntityContext context;
+
+    /**
+     * 
+     * @param id
+     * @param name
+     * @param sssNo
+     * @param address
+     * @param birthdate
+     * @param annualSalary
+     * @param loanAmount
+     * @return @throws
+     *         CreateException
+     */
+    public Integer ejbCreate(Integer id, String name, String sssNo,
+            String address, Date birthdate, Double annualSalary,
+            Double loanAmount) throws CreateException {
+        String insertQuery = "INSERT INTO CUSTOMER "
+                + "(ID,NAME,SSS_NO,BIRTHDATE,ADDRESS,ANNUAL_SALARY,LOAN_AMOUNT)"
+                + " VALUES (?,?,?,?,?,?,?)";
+        this.id = id;
+        this.name = name;
+        this.birthdate = birthdate;
+        this.sssNo = sssNo;
+        this.address = address;
+        this.annualSalary = annualSalary;
+        this.loanAmount = loanAmount;
+        Connection conn = null;
+        PreparedStatement ps = null;
+        try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(insertQuery);
+            ps.setInt(1, id.intValue());
+            ps.setString(2, name);
+            ps.setString(3, sssNo);
+            ps.setDate(4, new java.sql.Date(birthdate.getTime()));
+            ps.setString(5, address);
+            ps.setDouble(6, annualSalary.doubleValue());
+            ps.setDouble(7, loanAmount.doubleValue());
+            if (ps.executeUpdate() != 1) {
+                throw new CreateException("Failed to Add Customer");
+            }
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+        return id;
+    }
+
+    /**
+     * 
+     * @param id
+     * @return @throws
+     *         CreateException
+     */
+    public Integer ejbCreate(Integer id) throws CreateException {
+        String insertQuery = "INSERT INTO CUSTOMER " + "(ID)" + " VALUES (?)";
+        this.id = id;
+        Connection conn = null;
+        PreparedStatement ps = null;
+            try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(insertQuery);
+            ps.setInt(1, id.intValue());
+            if (ps.executeUpdate() != 1) {
+                throw new CreateException("Failed to Add Customer");
+            }   
+        } catch (SQLException se) {
+            se.printStackTrace();
+            throw new EJBException(se);
+        } finally {
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+        return id;
+    }
+
+    /**
+     * 
+     * @param id
+     * @param name
+     * @param sssNo
+     * @param address
+     * @param birthdate
+     * @param annualSalary
+     * @param loanAmount
+     */
+    public void ejbPostCreate(Integer id, String name, String sssNo,
+            String address, Date birthdate, Double annualSalary,
+            Double loanAmount) {
+
+    }
+
+    /**
+     * 
+     * @param id
+     */
+    public void ejbPostCreate(Integer id) {
+
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+     */
+    public void setEntityContext(EntityContext context) {
+        this.context = context;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.ejb.EntityBean#unsetEntityContext()
+     */
+    public void unsetEntityContext() {
+        this.context = null;
+    }
+
+    /**
+     * 
+     * @param primaryKey
+     * @return @throws
+     *         FinderException
+     */
+    public Integer ejbFindByPrimaryKey(Integer primaryKey)
+            throws FinderException {
+        Connection conn = null;
+        PreparedStatement ps = null;
+        ResultSet result = null;
+        String query = "SELECT ID FROM CUSTOMER WHERE ID=?";
+
+        try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(query);
+            ps.setInt(1, primaryKey.intValue());
+            result = ps.executeQuery();
+            if (!result.next()) {
+                throw new ObjectNotFoundException(
+                        "Customer not found with ID: " + primaryKey);
+            }
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                result.close();
+            } catch (Exception e) {
+            }
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+        return primaryKey;
+    }
+
+    /**
+     * 
+     * @param sssNo
+     * @return @throws
+     *         FinderException
+     */
+    public Integer ejbFindBySssNo(String sssNo) throws FinderException {
+        Connection conn = null;
+        PreparedStatement ps = null;
+        ResultSet result = null;
+        String query = "SELECT ID FROM CUSTOMER WHERE SSS_NO=?";
+        int customerId;
+
+        try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(query);
+            ps.setString(1, sssNo);
+            result = ps.executeQuery();
+            if (!result.next()) {
+                throw new ObjectNotFoundException(
+                        "Customer not found with SSS_NO:" + sssNo);
+            } else {
+                customerId = result.getInt(1);
+            }
+            if (result.next()) {
+                //Invalid state duplicate entry for unique index
+                throw new SQLException(
+                        "Invalid database state.Duplicate entries for unique index SSS_NO");
+            }
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                result.close();
+            } catch (Exception e) {
+            }
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+        return new Integer(customerId);
+    }
+
+    public void ejbActivate() {
+        // Not implemented.
+    }
+
+    public void ejbPassivate() {
+        // Not implemented.
+    }
+
+    public void ejbLoad() {
+
+        Integer primaryKey = (Integer) context.getPrimaryKey();
+        Connection conn = null;
+        PreparedStatement ps = null;
+        ResultSet result = null;
+        String query = "SELECT NAME,BIRTHDATE,SSS_NO,ADDRESS,ANNUAL_SALARY,LOAN_AMOUNT"
+                + " FROM CUSTOMER WHERE ID=?";
+        try {
+            conn = this.getConnection();
+            ps= conn.prepareStatement(query);
+            ps.setInt(1, primaryKey.intValue());
+            result = ps.executeQuery();
+
+            if (result.next()) {
+                this.id = primaryKey;
+                this.name = result.getString(1);
+                this.birthdate = new Date(result.getDate(2).getTime());
+                this.sssNo = result.getString(3);
+                this.address = result.getString(4);
+                this.annualSalary = new Double(result.getDouble(5));
+                this.loanAmount = new Double(result.getDouble(6));
+
+            } else {
+                throw new EJBException();
+            }
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                result.close();
+            } catch (Exception e) {
+            }
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    public void ejbStore() {
+        String updateQuery = "UPDATE CUSTOMER SET NAME=?, BIRTHDATE=?, SSS_NO=?, ADDRESS=?,ANNUAL_SALARY=?,LOAN_AMOUNT=? WHERE ID=?";
+        Connection conn = null;
+        PreparedStatement ps = null;
+        try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(updateQuery);
+            ps.setString(1, name);
+            ps.setDate(2, new java.sql.Date(birthdate.getTime()));
+            ps.setString(3, sssNo);
+            ps.setString(4, address);
+            ps.setDouble(5, annualSalary.doubleValue());
+            ps.setDouble(6, loanAmount.doubleValue());
+            ps.setInt(7, id.intValue());
+            ps.executeUpdate();
+            /*if (ps.executeUpdate() != 1) {
+                throw new EJBException("ejbStore unable to update table");
+            }*/
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    public void ejbRemove() {
+        String deleteQuery = "DELETE FROM CUSTOMER WHERE ID=?";
+        Connection conn = null;
+        PreparedStatement ps = null;
+        try {
+            conn = this.getConnection();
+            ps = conn.prepareStatement(deleteQuery);
+            ps.setInt(1, id.intValue());
+            if (ps.executeUpdate() != 1) {
+                throw new EJBException("ejbStore unable to update table");
+            }
+        } catch (SQLException se) {
+            throw new EJBException(se);
+        } finally {
+            try {
+                ps.close();
+            } catch (Exception e) {
+            }
+            try {
+                conn.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    /**
+     * 
+     * @return @throws
+     *         SQLException
+     */
+    private Connection getConnection() throws SQLException {
+        try {
+            Context jndiCntx = new InitialContext();
+            DataSource ds = (DataSource) jndiCntx
+                    .lookup("java:comp/env/jdbc/ibm-demo");
+            return ds.getConnection();
+        } catch (NamingException ne) {
+            ne.printStackTrace();
+            throw new EJBException(ne);
+        }
+    }
+
+    /**
+     * @return Returns the address.
+     */
+    public String getAddress() {
+        return address;
+    }
+
+    /**
+     * @param address
+     *            The address to set.
+     */
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    /**
+     * @return Returns the annualSalary.
+     */
+    public Double getAnnualSalary() {
+        return annualSalary;
+    }
+
+    /**
+     * @param annualSalary
+     *            The annualSalary to set.
+     */
+    public void setAnnualSalary(Double annualSalary) {
+        this.annualSalary = annualSalary;
+    }
+
+    /**
+     * @return Returns the birthdate.
+     */
+    public Date getBirthdate() {
+        return birthdate;
+    }
+
+    /**
+     * @param birthdate
+     *            The birthdate to set.
+     */
+    public void setBirthdate(Date birthdate) {
+        this.birthdate = birthdate;
+    }
+
+    /**
+     * @return Returns the loanAmount.
+     */
+    public Double getLoanAmount() {
+        return loanAmount;
+    }
+
+    /**
+     * @param loanAmount
+     *            The loanAmount to set.
+     */
+    public void setLoanAmount(Double loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the sssNo.
+     */
+    public String getSssNo() {
+        return sssNo;
+    }
+
+    /**
+     * @param sssNo
+     *            The sssNo to set.
+     */
+    public void setSssNo(String sssNo) {
+        this.sssNo = sssNo;
+    }
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,85 @@
+/*
+* 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.
+*/
+/*
+ * Created on Sep 26, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package com.ibm.demo.entity;
+
+import java.rmi.RemoteException;
+import java.util.Date;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+import javax.ejb.FinderException;
+
+/**
+ * @author cpineda
+ * 
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+public interface CustomerHomeRemote extends EJBHome {
+
+    /**
+     * 
+     * @param id
+     * @param name
+     * @param sssNo
+     * @param address
+     * @param birthdate
+     * @param annualSalary
+     * @param loanAmount
+     * @return
+     * @throws CreateException
+     * @throws RemoteException
+     */
+    public CustomerRemote create(Integer id,String name,String sssNo,String address,Date birthdate,
+                                 Double annualSalary,Double loanAmount) throws CreateException,RemoteException;
+    
+    /**
+     * 
+     * @param primaryKey
+     * @return
+     * @throws CreateException
+     * @throws RemoteException
+     */
+    public CustomerRemote create(Integer primaryKey)throws CreateException,RemoteException;
+
+    /**
+     * 
+     * @param pk
+     * @return @throws
+     *         FinderException
+     * @throws RemoteException
+     */
+    public CustomerRemote findByPrimaryKey(Integer pk) throws FinderException,
+            RemoteException;
+
+    /**
+     * 
+     * @param sssNo
+     * @return @throws
+     *         FinderException
+     * @throws RemoteException
+     */
+    public CustomerRemote findBySssNo(String sssNo) throws FinderException,
+            RemoteException;
+
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerHomeRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,58 @@
+/*
+* 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.
+*/
+/*
+ * Created on Sep 26, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package com.ibm.demo.entity;
+
+import java.util.Date;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+/**
+ * @author cpineda
+ * 
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+public interface CustomerRemote extends EJBObject {
+
+    
+    public void setName(String name) throws RemoteException;
+    public String getName() throws RemoteException;
+    
+    public void setSssNo(String sssNo) throws RemoteException;
+    public String getSssNo() throws RemoteException;
+    
+    public void setAddress(String address) throws RemoteException;
+    public String getAddress() throws RemoteException;
+    
+    public void setBirthdate(Date birthdate) throws RemoteException;
+    public Date getBirthdate() throws RemoteException;
+    
+    public void setAnnualSalary(Double annualSalary) throws RemoteException;
+    public Double getAnnualSalary() throws RemoteException;
+    
+    public void setLoanAmount(Double loanAmount) throws RemoteException;
+    public Double getLoanAmount() throws RemoteException;
+    
+
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/entity/CustomerRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,123 @@
+/*
+* 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 com.ibm.demo.session.stateful;
+
+import javax.ejb.*;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import java.rmi.RemoteException;
+import java.util.Date;
+
+import com.ibm.demo.entity.CustomerHomeRemote;
+import com.ibm.demo.entity.CustomerRemote;
+
+/**
+ * @author hisidro
+ *
+ */
+public class StatefulLoanManagerBean implements SessionBean{
+    
+    private int submit_count;
+    
+    public void ejbCreate(){
+        this.submit_count = 0;
+    }
+    
+    public void ejbRemove(){}
+    public void ejbActivate(){}
+    public void ejbPassivate(){}
+    public void setSessionContext(SessionContext ctx){}
+    
+    /**
+     * @param id
+     * @param name
+     * @param address
+     * @param birthdate
+     * @param sssNo
+     * @param annualSalary
+     * @param loanAmount
+     */
+    public void submitLoanApplication(Integer id, String name, String address, Date birthdate,
+                                      String sssNo, Double annualSalary, Double loanAmount) {
+        
+        CustomerHomeRemote customerHome = null;
+        CustomerRemote customer = null;
+        
+        try{
+            Context jndiContext = new InitialContext();
+            Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");
+
+            customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
+        } catch (NamingException ne){
+            System.out.println("Naming Exception: " + ne.getMessage());
+        }
+        
+        try{
+            customer = customerHome.create(id, name, sssNo, address, birthdate, annualSalary, loanAmount);
+            submit_count++;
+        } catch(RemoteException re){
+            System.out.println("Remote Exception: " + re.getMessage());
+        } catch(CreateException ce){
+            System.out.println("Create Exception: " + ce.getMessage());
+        }
+    }
+    
+    /**
+     * @return
+     */
+    public int getSubmitCount(){
+        return submit_count;
+    }
+    
+    /**
+     * @return
+     */
+    public int getMaxPK(){
+        int maxPK = 0;
+        
+        CustomerHomeRemote customerHome = null;
+        CustomerRemote customer = null;
+        
+        try{
+            Context jndiContext = new InitialContext();
+            Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");
+
+            customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
+        } catch (NamingException ne){
+            System.out.println("Naming Exception: " + ne.getMessage());
+        }
+        
+        for(int pk = 1;;pk++){
+            try{
+                customer = customerHome.findByPrimaryKey(new Integer(pk));
+            } catch(FinderException fe){
+                System.out.println("Find Exception: " + fe.getMessage());
+                maxPK = pk - 1;
+                break;
+            } catch(RemoteException re){
+                System.out.println("Remote Exception: " + re.getMessage());
+                break;
+            }
+        }
+        
+        return maxPK;
+    }
+    
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,34 @@
+/*
+* 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 com.ibm.demo.session.stateful;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+
+/**
+ * @author hisidro
+ * 
+ */
+public interface StatefulLoanManagerHomeRemote extends EJBHome {
+
+    /**
+     * @return
+     * @throws RemoteException
+     * @throws CreateException
+     */
+    public StatefulLoanManagerRemote create() throws RemoteException, CreateException;
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,53 @@
+/*
+* 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 com.ibm.demo.session.stateful;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+import java.util.Date;
+
+/**
+ * @author hisidro
+ *
+ */
+public interface StatefulLoanManagerRemote extends EJBObject{
+
+    /**
+     * @param id
+     * @param name
+     * @param address
+     * @param birthdate
+     * @param sssNo
+     * @param annualSalary
+     * @param loanAmount
+     * @throws RemoteException
+     */
+    public void submitLoanApplication(Integer id, String name, String address, Date birthdate,
+                                      String sssNo, Double annualSalary, Double loanAmount) throws RemoteException;
+    
+    /**
+     * @return
+     * @throws RemoteException
+     */
+    public int getSubmitCount() throws RemoteException;
+    
+    /**
+     * @return
+     * @throws RemoteException
+     */
+    public int getMaxPK() throws RemoteException;
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateful/StatefulLoanManagerRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,88 @@
+/*
+* 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 com.ibm.demo.session.stateless;
+
+import javax.ejb.*;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.ArrayList;
+
+import com.ibm.demo.entity.CustomerHomeRemote;
+import com.ibm.demo.entity.CustomerRemote;
+
+/**
+ * @author hisidro
+ *
+ */
+public class LoanManagerBean implements SessionBean{
+    
+    public void ejbCreate(){}
+    public void ejbRemove(){}
+    public void ejbActivate(){}
+    public void ejbPassivate(){}
+    public void setSessionContext(SessionContext ctx){}
+    
+    /**
+     * @return
+     */
+    public List deniedLoans() {
+        
+        CustomerHomeRemote customerHome = null;
+        
+        try{
+            Context jndiContext = new InitialContext();
+            Object obj = jndiContext.lookup("java:comp/env/ejb/CustomerHomeRemote");
+
+            customerHome = (CustomerHomeRemote) PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);
+        } catch (NamingException ne){
+            System.out.println("Naming Exception: " + ne.getMessage());
+        }
+        
+        List granted = new ArrayList();
+        
+        //loop through all customers
+        CustomerRemote customer = null;
+        for (int i = 1; ; i++){
+            Integer pk = new Integer(i);
+            try{
+                customer = customerHome.findByPrimaryKey(pk);
+            } catch(FinderException fe){
+                System.out.println("Find Exception: " + fe.getMessage());
+                break;
+            } catch(RemoteException re){
+                System.out.println("Remote Exception: " + re.getMessage());
+                break;
+            }
+            // Check to see if the annualSalary to loanAmount ratio is not acceptable (<0.1)
+            
+            try{
+                double ratio = customer.getAnnualSalary().doubleValue() / customer.getLoanAmount().doubleValue();
+                if((customer != null)&&(ratio < 0.1)){
+                    granted.add(customer.getName());
+                }
+            }catch (RemoteException re){
+                System.out.println("Remote Exception: " + re.getMessage());
+            }
+        }
+        return granted;
+    }
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,34 @@
+/*
+* 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 com.ibm.demo.session.stateless;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+
+/**
+ * @author hisidro
+ * 
+ */
+public interface LoanManagerHomeRemote extends EJBHome {
+
+    /**
+     * @return
+     * @throws RemoteException
+     * @throws CreateException
+     */
+    public LoanManagerRemote create() throws RemoteException, CreateException;
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerHomeRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java Wed Mar 12 14:54:41 2008
@@ -0,0 +1,34 @@
+/*
+* 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 com.ibm.demo.session.stateless;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+import java.util.List;
+
+/**
+ * @author hisidro
+ *
+ */
+public interface LoanManagerRemote extends EJBObject{
+    
+    /**
+     * @return
+     * @throws RemoteException
+     */
+    public List deniedLoans() throws RemoteException;
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/com/ibm/demo/session/stateless/LoanManagerRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml Wed Mar 12 14:54:41 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+   <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
+         xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
+         configId="geronimo/SessionWebApp/1.0/car" parentId="geronimo/SessionBeanDemo/1.0/car">
+     
+    <context-root>/session</context-root> 
+    <naming:ejb-ref>
+        <naming:ref-name>ejb/LoanManagerHomeRemote</naming:ref-name>
+        <naming:target-name>geronimo.server:EJBModule=geronimo/SessionBeanDemo/1.0/car,J2EEApplication=null,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=LoanManagerEJB</naming:target-name>
+    </naming:ejb-ref>
+    
+    <naming:ejb-ref>
+        <naming:ref-name>ejb/StatefulLoanManagerHomeRemote</naming:ref-name>
+        <naming:target-name>geronimo.server:EJBModule=geronimo/SessionBeanDemo/1.0/car,J2EEApplication=null,J2EEServer=geronimo,j2eeType=StatefulSessionBean,name=StatefulLoanManagerEJB</naming:target-name>
+    </naming:ejb-ref>
+</web-app>

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml?rev=636529&view=auto
==============================================================================
--- geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml (added)
+++ geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml Wed Mar 12 14:54:41 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<jboss-web>
+    <context-root>/session</context-root>
+    <ejb-ref>
+        <ejb-ref-name>ejb/LoanManagerHomeRemote</ejb-ref-name>
+        <jndi-name>LoanManagerHomeRemote</jndi-name>
+    </ejb-ref>
+    <ejb-ref>
+        <ejb-ref-name>ejb/StatefulLoanManagerHomeRemote</ejb-ref-name>
+        <jndi-name>StatefulLoanManagerHomeRemote</jndi-name>
+    </ejb-ref>
+</jboss-web>

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/1.0/migration-ejb-session/src/webapp/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message