You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ec...@apache.org on 2008/04/11 22:48:42 UTC

svn commit: r647303 [2/8] - in /geronimo/samples/branches/2.0: migration-ejb-bmp/ migration-ejb-bmp/config/ migration-ejb-bmp/config/geronimo/ migration-ejb-bmp/config/jboss/ migration-ejb-bmp/src/ migration-ejb-bmp/src/META-INF/ migration-ejb-bmp/src/...

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml Fri Apr 11 13:48:31 2008
@@ -0,0 +1,142 @@
+<?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.
+-->
+
+<ejb-jar  xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
+
+   <display-name>Generated by XDoclet</display-name>
+
+   <enterprise-beans>
+
+      <!-- Session Beans -->
+      <session >
+         <description><![CDATA[LoanManager]]></description>
+         <display-name>LoanManager</display-name>
+
+         <ejb-name>LoanManager</ejb-name>
+
+         <home>org.apache.geronimo.samples.loan.ejb.LoanManagerHome</home>
+         <remote>org.apache.geronimo.samples.loan.ejb.LoanManager</remote>
+         <local-home>org.apache.geronimo.samples.loan.ejb.LoanManagerLocalHome</local-home>
+         <local>org.apache.geronimo.samples.loan.ejb.LoanManagerLocal</local>
+         <ejb-class>org.apache.geronimo.samples.loan.ejb.LoanManagerBean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+
+         <ejb-local-ref >
+            <ejb-ref-name>ejb/LoanLocal</ejb-ref-name>
+            <ejb-ref-type>Entity</ejb-ref-type>
+            <local-home>org.apache.geronimo.samples.loan.ejb.LoanHomeLocal</local-home>
+            <local>org.apache.geronimo.samples.loan.ejb.LoanLocal</local>
+            <ejb-link>Loan</ejb-link>
+         </ejb-local-ref>
+
+      </session>
+
+     <!--
+       To add session beans that you have deployment descriptor info for, add
+       a file to your XDoclet merge directory called session-beans.xml that contains
+       the <session></session> markup for those beans.
+     -->
+
+      <!-- Entity Beans -->
+      <entity >
+         <description><![CDATA[]]></description>
+
+         <ejb-name>Loan</ejb-name>
+
+         <local-home>org.apache.geronimo.samples.loan.ejb.LoanHomeLocal</local-home>
+         <local>org.apache.geronimo.samples.loan.ejb.LoanLocal</local>
+
+         <ejb-class>org.apache.geronimo.samples.loan.ejb.LoanBMP</ejb-class>
+         <persistence-type>Bean</persistence-type>
+         <prim-key-class>java.lang.Integer</prim-key-class>
+         <reentrant>false</reentrant>
+
+         <resource-ref >
+            <res-ref-name>jdbc/LoanDataSource</res-ref-name>
+            <res-type>javax.sql.DataSource</res-type>
+            <res-auth>Container</res-auth>
+         </resource-ref>
+
+      </entity>
+
+     <!--
+       To add entity beans that you have deployment descriptor info for, add
+       a file to your XDoclet merge directory called entity-beans.xml that contains
+       the <entity></entity> markup for those beans.
+     -->
+
+      <!-- Message Driven Beans -->
+     <!--
+       To add message driven beans that you have deployment descriptor info for, add
+       a file to your XDoclet merge directory called message-driven-beans.xml that contains
+       the <message-driven></message-driven> markup for those beans.
+     -->
+
+   </enterprise-beans>
+
+   <!-- Relationships -->
+
+   <!-- Assembly Descriptor -->
+     <!--
+       To specify your own assembly descriptor info here, add a file to your
+       XDoclet merge directory called assembly-descriptor.xml that contains
+       the <assembly-descriptor></assembly-descriptor> markup.
+     -->
+
+   <assembly-descriptor >
+     <!--
+       To specify additional security-role elements, add a file in the merge
+       directory called ejb-security-roles.xml that contains them.
+     -->
+
+   <!-- method permissions -->
+     <!--
+       To specify additional method-permission elements, add a file in the merge
+       directory called ejb-method-permissions.ent that contains them.
+     -->
+
+   <!-- transactions -->
+     <!--
+       To specify additional container-transaction elements, add a file in the merge
+       directory called ejb-container-transactions.ent that contains them.
+     -->
+   <container-transaction >
+      <method >
+         <ejb-name>Loan</ejb-name>
+          <method-name>*</method-name>
+       </method>
+       <trans-attribute>Required</trans-attribute>
+    </container-transaction>
+
+   <!-- finder transactions -->
+
+   <!-- message destinations -->
+     <!--
+       To specify additional message-destination elements, add a file in the merge
+       directory called ejb-message-destinations.ent that contains them.
+     -->
+
+   <!-- exclude list -->
+     <!--
+       To specify an exclude-list element, add a file in the merge directory
+       called ejb-exclude-list.xml that contains it.
+     -->
+   </assembly-descriptor>
+
+</ejb-jar>

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java Fri Apr 11 13:48:31 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.
+*/
+package org.apache.geronimo.samples.loan.client;
+
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import org.apache.geronimo.samples.loan.ejb.LoanManager;
+import org.apache.geronimo.samples.loan.ejb.LoanManagerHome;
+import org.apache.geronimo.samples.loan.util.PropertyLoader;
+
+public class LoanStatusChanger {
+
+   private static final String CLIENT_PROP_NAME = "client.properties";
+   
+   private static final String FACTORY_INITIAL = "java.naming.factory.initial";
+   private static final String FACTORY_URL = "java.naming.factory.url.pkgs";
+   private static final String PROVIDER_URL = "java.naming.provider.url";
+   
+   private static final String ENVIROMENT = "loan.enviroment";
+   
+   private static final String SECURITY_PRINCIPAL = "java.naming.security.principal";
+   private static final String SECURITY_CREDENTIALS = "java.naming.security.credentials";
+   
+   private static final String JBOSS_ENVIROMENT = "jboss";
+   private static final String GERONIMO_ENVIROMENT = "geronimo";
+
+    public static void main(String[] args) throws Exception{
+        int loanId; 
+        int status;
+        try {
+            loanId = Integer.parseInt(args[0]);
+            status = Integer.parseInt(args[1]);
+        } catch (RuntimeException e) {           
+            System.out.println("java -jar LoanStatusChanger.jar <loanId> <status>");
+            return;
+        }
+        
+        PropertyLoader propLoader = PropertyLoader.getInstance(CLIENT_PROP_NAME);
+        
+        Hashtable env = new Hashtable();
+        
+        String enviroment = propLoader.getValue(ENVIROMENT);
+        
+        env.put(FACTORY_INITIAL, propLoader.getValue(FACTORY_INITIAL));
+        env.put(PROVIDER_URL, propLoader.getValue(PROVIDER_URL));
+        
+        if(enviroment.equals(JBOSS_ENVIROMENT)){
+            env.put(FACTORY_URL, propLoader.getValue(FACTORY_URL));
+        }else if(enviroment.equals(GERONIMO_ENVIROMENT)){
+            env.put(SECURITY_PRINCIPAL, propLoader.getValue(SECURITY_PRINCIPAL));
+            env.put(SECURITY_CREDENTIALS, propLoader.getValue(SECURITY_CREDENTIALS));
+        }else {
+            System.out.println("Unsupported Application Server");
+            return;
+        }
+        
+        System.out.println("Changing Loan Status === > ");
+        Context context = new InitialContext(env);
+        Object objRef = context.lookup(LoanManagerHome.JNDI_NAME);
+        LoanManagerHome loanManagerHome = (LoanManagerHome)PortableRemoteObject.narrow(objRef, LoanManagerHome.class);
+        LoanManager loanManager = loanManagerHome.create();
+        
+        loanManager.changeLoanStatus(loanId, status);
+        
+        System.out.println("Loan Status Changed Successfully !!!");
+    }
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/client/LoanStatusChanger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,69 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.geronimo.samples.loan.dto;
+
+import java.io.Serializable;
+
+public class LoanDTO implements Serializable{
+    
+    private int loanId;
+    private String customerName;
+    private double loanAmount;
+    private double annualSalary;
+    private String address;
+    private int loanStatus;
+    
+    public String getAddress() {
+        return address;
+    }
+    public void setAddress(String address) {
+        this.address = address;
+    }
+    public double getAnnualSalary() {
+        return annualSalary;
+    }
+    public void setAnnualSalary(double annualSalary) {
+        this.annualSalary = annualSalary;
+    }
+    public String getCustomerName() {
+        return customerName;
+    }
+    public void setCustomerName(String customerName) {
+        this.customerName = customerName;
+    }
+    public double getLoanAmount() {
+        return loanAmount;
+    }
+    public void setLoanAmount(double loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+    public int getLoanId() {
+        return loanId;
+    }
+    public void setLoanId(int loanId) {
+        this.loanId = loanId;
+    }
+    public int getLoanStatus() {
+        return loanStatus;
+    }
+    public void setLoanStatus(int loanStatus) {
+        this.loanStatus = loanStatus;
+    }
+    
+      
+    
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/dto/LoanDTO.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,77 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * BMP layer for Loan.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public class LoanBMP
+   extends org.apache.geronimo.samples.loan.ejb.LoanBean
+   implements javax.ejb.EntityBean
+{
+
+   public boolean isModified()
+   {
+      return dirty;
+   }
+
+   protected void makeDirty()
+   {
+      dirty = true;
+   }
+
+   protected void makeClean()
+   {
+      dirty = false;
+   }
+
+   private boolean dirty = false;
+
+   public void ejbLoad() throws javax.ejb.EJBException, java.rmi.RemoteException
+   {
+      super.ejbLoad();
+      makeClean();
+   }
+
+   public void ejbStore() throws javax.ejb.EJBException, java.rmi.RemoteException
+   {
+      if (isModified())
+      {
+         super.ejbStore();
+         makeClean();
+      }
+   }
+
+   public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException
+   {
+      super.ejbActivate();
+   }
+
+   public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException
+   {
+      super.ejbPassivate();
+
+   }
+
+   public void setEntityContext(javax.ejb.EntityContext ctx) throws javax.ejb.EJBException
+   {
+      super.setEntityContext(ctx);
+   }
+
+   public void unsetEntityContext() throws javax.ejb.EJBException
+   {
+      super.unsetEntityContext();
+   }
+
+   public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException, javax.ejb.RemoveException
+   {
+      super.ejbRemove();
+
+   }
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBMP.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,416 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.geronimo.samples.loan.ejb;
+
+import java.rmi.RemoteException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+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.ejb.RemoveException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+/**
+ *
+ * @ejb.bean type="BMP" bmp-version="2.x" name="Loan" local-jndi-name="Loan" view-type="local"
+ *      primkey-field="loanId"
+ * @ejb.interface generate="local" local-class="org.apache.geronimo.samples.loan.ejb.LoanLocal"
+ * @ejb.home generate="local" local-class="org.apache.geronimo.samples.loan.ejb.LoanHomeLocal"
+ * @ejb.transaction type="Required"
+ * @ejb.resource-ref res-ref-name="jdbc/LoanDataSource" res-type="javax.sql.DataSource" res-auth="Container"
+ * 
+ * @ejb.persistence table-name="LOAN"
+ *          
+ */
+public class LoanBean implements EntityBean {
+
+    /** The entity context */
+    private EntityContext context;
+    
+    private Connection connection = null;
+    
+    private Integer loanId;
+    private String customerName;
+    private Double loanAmount;
+    private String address;
+    private Double annualSalary;
+    private Integer loanStatus;
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public String getAddress() {
+        return address;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param address
+     */
+    public void setAddress(String address) {
+        this.address = address;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public Double getAnnualSalary() {
+        return annualSalary;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param annualSalary
+     */
+    public void setAnnualSalary(Double annualSalary) {
+        this.annualSalary = annualSalary;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public String getCustomerName() {
+        return customerName;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param customerName
+     */
+    public void setCustomerName(String customerName) {
+        this.customerName = customerName;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public Double getLoanAmount() {
+        return loanAmount;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param loanAmount
+     */
+    public void setLoanAmount(Double loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public Integer getLoanId() {
+        return loanId;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param loanId
+     */
+    public void setLoanId(Integer loanId) {
+        this.loanId = loanId;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @return
+     */
+    public Integer getLoanStatus() {
+        return loanStatus;
+    }
+    
+    /**
+     * @ejb.interface-method view-type = "local"
+     * @param loanStatus
+     */
+    public void setLoanStatus(Integer loanStatus) {
+        this.loanStatus = loanStatus;
+    }
+
+    /**
+     * @ejb.create-method
+     * @param customerName
+     * @param loanAmount
+     * @param address
+     * @param annualSalary
+     * @return
+     * @throws CreateException
+     */
+    public Integer ejbCreate(String customerName, Double loanAmount, String address, Double annualSalary) throws CreateException {
+        try {
+            openConnection();
+            this.loanId = getNextLoanId();
+            this.customerName = customerName;
+            this.loanAmount = loanAmount;
+            this.address = address;
+            this.annualSalary = annualSalary;
+            this.loanStatus = new Integer(0); //Not Approved Yet
+            insertRow();
+            closeConnection();
+        } catch (Exception e) {
+           throw new EJBException("ejbCreate: "+e.getMessage());
+        }
+        return this.loanId;
+    }
+
+    /**
+     * 
+     * @param id
+     * @param name
+     * @param loanAmount
+     * @throws CreateException
+     */
+    public void ejbPostCreate(String customerName, Double loanAmount, String address, Double annualSalary) throws CreateException {
+    }
+    
+    public Integer ejbFindByPrimaryKey(Integer primKey) throws FinderException {
+        boolean status = false;
+        
+        try{
+            openConnection();
+            status = selectByPrimaryKey(primKey);
+            closeConnection();
+        }catch(Exception e){
+            throw new EJBException("ejbFindByPrimaryKey: "+e.getMessage());
+        }
+        
+        if(status){
+            return primKey;
+        }else {
+            throw new ObjectNotFoundException();
+        }
+    }
+    
+    public Collection ejbFindByAll() throws FinderException {
+        Collection result = null;
+        
+        try{
+          openConnection();  
+          result = selectAll();
+          closeConnection();
+        }catch (Exception e){
+            throw new EJBException("ejbFindByAll: "+e.getMessage());
+        }
+        
+        if(result.isEmpty()){
+            throw new ObjectNotFoundException("No rows found");
+        }else {
+            return result;
+        }
+    }
+    
+    public void ejbActivate() throws EJBException, RemoteException {
+        this.loanId = (Integer)context.getPrimaryKey();
+    }
+    
+    /* (non-Javadoc)
+     * @see javax.ejb.EntityBean#ejbLoad()
+     */
+    public void ejbLoad() throws EJBException, RemoteException {
+        try {
+            openConnection();
+            loadRow();
+            closeConnection();
+        } catch (Exception e) {
+            throw new EJBException("ejbLoad: "+e.getMessage());
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see javax.ejb.EntityBean#ejbPassivate()
+     */
+    public void ejbPassivate() throws EJBException, RemoteException {
+    }
+    
+    /* (non-Javadoc)
+     * @see javax.ejb.EntityBean#ejbRemove()
+     */
+    public void ejbRemove()
+        throws RemoveException,
+        EJBException,
+        RemoteException {
+        
+        try {
+            openConnection();
+            deleteRow();
+            closeConnection();
+        } catch (Exception e) {
+            throw new EJBException("ejbRemove:"+e.getMessage());
+        } 
+    }
+    
+    /* (non-Javadoc)
+     * @see javax.ejb.EntityBean#ejbStore()
+     */
+    public void ejbStore() throws EJBException, RemoteException {
+        try {
+            openConnection();
+            storeRow();
+            closeConnection();
+        } catch (Exception e) {
+            throw new EJBException("ejbStore: "+e.getMessage());
+        }
+    }
+    
+    /**
+     * 
+     */
+     public void setEntityContext(EntityContext newContext) throws EJBException {
+         context = newContext;
+     }
+
+     /**
+      * 
+      */
+     public void unsetEntityContext() throws EJBException {
+         context = null;
+     }
+     
+     private void openConnection() throws NamingException, SQLException {
+         Context context = new InitialContext();
+         DataSource ds = (DataSource)context.lookup("java:comp/env/jdbc/LoanDataSource");
+         connection = ds.getConnection();
+     }
+     
+     private void closeConnection() throws SQLException {
+         connection.close();
+     }
+     
+     private void insertRow() throws SQLException {
+         String SQL = "INSERT INTO LOAN (LOAN_ID, CUSTOMER_NAME, LOAN, ADDRESS, ANNUAL_SALARY, LOAN_STATUS) VALUES (?,?,?,?,?,?)";
+         PreparedStatement pStmt = connection.prepareStatement(SQL);
+         pStmt.setInt(1, loanId.intValue());
+         pStmt.setString(2, customerName);
+         pStmt.setDouble(3, loanAmount.doubleValue());
+         pStmt.setString(4, address);
+         pStmt.setDouble(5, annualSalary.doubleValue());
+         pStmt.setInt(6, loanStatus.intValue());
+         
+         pStmt.executeUpdate();
+         pStmt.close();
+     }
+     
+     private void deleteRow() throws SQLException {
+         String SQL = "DELETE FROM LOAN WHERE LOAN_ID = ?";
+         PreparedStatement pStmt = connection.prepareStatement(SQL);
+         pStmt.setInt(1, loanId.intValue());
+         
+         pStmt.executeUpdate();
+         pStmt.close();
+     }
+    
+    private boolean selectByPrimaryKey(Integer key) throws SQLException {
+        String SQL = "SELECT LOAN_ID, CUSTOMER_NAME, LOAN, ADDRESS, ANNUAL_SALARY, LOAN_STATUS FROM CUSTOMER WHERE LOAN_ID = ?";
+        PreparedStatement pStmt = connection.prepareStatement(SQL);
+        pStmt.setInt(1, key.intValue());
+        ResultSet rs = pStmt.executeQuery();
+        boolean status = rs.next();
+        
+        rs.close();
+        pStmt.close();
+        return status;
+    }
+    
+    private Collection selectAll() throws SQLException {
+        String SQL = "SELECT LOAN_ID, CUSTOMER_NAME, LOAN, ADDRESS, ANNUAL_SALARY, LOAN_STATUS FROM LOAN";
+        ArrayList dataSet = new ArrayList();
+        PreparedStatement pStmt = connection.prepareStatement(SQL);
+        ResultSet rs = pStmt.executeQuery();
+        
+        while(rs.next()){
+            dataSet.add(new Integer(rs.getInt("LOAN_ID")));
+        }
+        
+        rs.close();
+        pStmt.close();
+        return dataSet;
+    }
+    
+    private void loadRow() throws SQLException {
+        String SQL = "SELECT LOAN_ID, CUSTOMER_NAME, LOAN, ADDRESS, ANNUAL_SALARY, LOAN_STATUS FROM LOAN WHERE LOAN_ID = ?";
+        PreparedStatement pStmt = connection.prepareStatement(SQL);
+        pStmt.setInt(1, loanId.intValue());
+        
+        ResultSet rs = pStmt.executeQuery();
+        
+        if(rs.next()){
+            this.loanId = new Integer(rs.getInt("LOAN_ID"));
+            this.customerName = rs.getString("CUSTOMER_NAME");
+            this.loanAmount = new Double(rs.getDouble("LOAN"));
+            this.address = rs.getString("ADDRESS");
+            this.annualSalary = new Double(rs.getDouble("ANNUAL_SALARY"));
+            this.loanStatus = new Integer(rs.getInt("LOAN_STATUS"));
+        }
+        
+        rs.close();
+        pStmt.close();
+    }
+    
+    private void storeRow() throws SQLException {
+        String SQL = "UPDATE LOAN SET CUSTOMER_NAME=?, ADDRESS=?, ANNUAL_SALARY=?, LOAN=?, LOAN_STATUS=? WHERE LOAN_ID=?";
+
+        PreparedStatement pStmt = connection.prepareStatement(SQL);
+        
+        pStmt.setString(1, customerName);
+        pStmt.setString(2, address);
+        pStmt.setDouble(3, annualSalary.doubleValue());
+        pStmt.setDouble(4, loanAmount.doubleValue());
+        pStmt.setInt(5, loanId.intValue());
+        pStmt.setInt(6, loanStatus.intValue());
+        
+        pStmt.executeUpdate();
+        pStmt.close();
+        
+//        if(status == 0){
+//            throw new NoSuchEntityException("Storing row for id "+customerId+" failed");
+//        }        
+        
+    }
+    
+    private Integer getNextLoanId() throws SQLException {
+         Integer tempPrimaryKey = new Integer(0);
+         
+         String SQL = "SELECT MAX(LOAN_ID) FROM LOAN";
+
+         PreparedStatement pStmt = connection.prepareStatement(SQL);
+         ResultSet rs = pStmt.executeQuery();
+         
+         if(rs.next()){
+            tempPrimaryKey = new Integer(rs.getInt(1)+1); 
+         }
+         return tempPrimaryKey;
+    }
+
+ 
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,28 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Local home interface for Loan.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanHomeLocal
+   extends javax.ejb.EJBLocalHome
+{
+   public static final String COMP_NAME="java:comp/env/ejb/LoanLocal";
+   public static final String JNDI_NAME="Loan";
+
+   public org.apache.geronimo.samples.loan.ejb.LoanLocal create(java.lang.String customerName , java.lang.Double loanAmount , java.lang.String address , java.lang.Double annualSalary)
+      throws javax.ejb.CreateException;
+
+   public org.apache.geronimo.samples.loan.ejb.LoanLocal findByPrimaryKey(java.lang.Integer primKey)
+      throws javax.ejb.FinderException;
+
+   public java.util.Collection findByAll()
+      throws javax.ejb.FinderException;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanHomeLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,41 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Local interface for Loan.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanLocal
+   extends javax.ejb.EJBLocalObject
+{
+
+   public java.lang.String getAddress(  ) ;
+
+   public void setAddress( java.lang.String address ) ;
+
+   public java.lang.Double getAnnualSalary(  ) ;
+
+   public void setAnnualSalary( java.lang.Double annualSalary ) ;
+
+   public java.lang.String getCustomerName(  ) ;
+
+   public void setCustomerName( java.lang.String customerName ) ;
+
+   public java.lang.Double getLoanAmount(  ) ;
+
+   public void setLoanAmount( java.lang.Double loanAmount ) ;
+
+   public java.lang.Integer getLoanId(  ) ;
+
+   public void setLoanId( java.lang.Integer loanId ) ;
+
+   public java.lang.Integer getLoanStatus(  ) ;
+
+   public void setLoanStatus( java.lang.Integer loanStatus ) ;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,20 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Remote interface for LoanManager.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanManager
+   extends javax.ejb.EJBObject
+{
+
+   public void changeLoanStatus( int loanId,int status )
+      throws java.rmi.RemoteException;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,188 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.geronimo.samples.loan.ejb;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.geronimo.samples.loan.dto.LoanDTO;
+
+/**
+ *
+ * @ejb.bean name="LoanManager"
+ *           display-name="LoanManager"
+ *           description="LoanManager"
+ *           jndi-name="org.apache.geronimo.samples.loan.ejb.LoanManager"
+ *           local-jndi-name="LoanManager"
+ *           type="Stateless"
+ *           view-type="both"
+ * 
+ * @ejb.ejb-ref ejb-name="Loan" view-type="local" ref-name="ejb/LoanLocal"
+ * @ejb.interface generate="local,remote" local-class="org.apache.geronimo.samples.loan.ejb.LoanManagerLocal" remote-class="org.apache.geronimo.samples.loan.ejb.LoanManager"
+ * @ejb.home generate="local,remote" local-class="org.apache.geronimo.samples.loan.ejb.LoanManagerLocalHome" remote-class=""-class="org.apache.geronimo.samples.loan.ejb.LoanManagerHome"
+ */
+public class LoanManagerBean implements SessionBean {
+
+    /** The session context */
+    private SessionContext context;
+
+    /**
+     * 
+     */
+    public LoanManagerBean() {
+        super();
+    }
+
+    /**
+     * 
+     * @throws EJBException Thrown if method fails due to system-level error.
+     */
+    public void setSessionContext(SessionContext newContext)
+        throws EJBException {
+        context = newContext;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.ejb.SessionBean#ejbRemove()
+     */
+    public void ejbRemove() throws EJBException, RemoteException {
+    }
+
+    /* (non-Javadoc)
+     * @see javax.ejb.SessionBean#ejbActivate()
+     */
+    public void ejbActivate() throws EJBException, RemoteException {
+    }
+
+    /* (non-Javadoc)
+     * @see javax.ejb.SessionBean#ejbPassivate()
+     */
+    public void ejbPassivate() throws EJBException, RemoteException {
+    }
+
+    /**
+     * @ejb.create-method
+     * 
+     */
+    public void ejbCreate() throws CreateException {
+    }
+
+    /**
+     * @ejb.interface-method view-type = "local"
+     * 
+     * @throws EJBException Thrown if method fails due to system-level error.
+     */
+    public Collection lisLoans() throws EJBException {
+        ArrayList list = new ArrayList();
+        Context context = null;
+        
+        try{
+            context = new InitialContext();
+            LoanHomeLocal loanHome = (LoanHomeLocal)context.lookup(LoanHomeLocal.COMP_NAME);
+            Collection loanList = loanHome.findByAll();
+            
+            for(Iterator iterator = loanList.iterator(); iterator.hasNext();){
+                
+                LoanLocal loan = (LoanLocal)iterator.next(); 
+
+                LoanDTO loanDTO = new LoanDTO();
+                loanDTO.setLoanId(loan.getLoanId().intValue());
+                loanDTO.setCustomerName(loan.getCustomerName());
+                loanDTO.setLoanAmount(loan.getLoanAmount().doubleValue());
+                loanDTO.setAddress(loan.getAddress());
+                loanDTO.setAnnualSalary(loan.getAnnualSalary().doubleValue());
+                loanDTO.setLoanStatus(loan.getLoanStatus().intValue());
+                list.add(loanDTO);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }finally {
+            if(context != null){
+                try {
+                    context.close();
+                } catch (NamingException e1) {
+                    e1.printStackTrace();
+                }
+            }
+        }
+        return list;
+    }
+    
+    /**
+     * @ejb.interface-method view-type="local"
+     * @throws EJBException
+     */
+    public void registerLoan(LoanDTO dto) throws EJBException {
+        Context context = null;
+        
+        try{
+            context = new InitialContext();
+            LoanHomeLocal loanHome = (LoanHomeLocal)context.lookup(LoanHomeLocal.COMP_NAME);
+            loanHome.create(dto.getCustomerName(), new Double(dto.getLoanAmount()), dto.getAddress(), new Double(dto.getAnnualSalary()));
+            
+        }catch (Exception e){            
+            e.printStackTrace();
+        }finally {
+            if(context != null){
+                try {
+                    context.close();
+                } catch (NamingException e1) {
+                    e1.printStackTrace();
+                }
+            }
+        }
+    }
+    
+    /**
+     * @ejb.interface-method view-type="both"
+     * @return
+     * @throws EJBException
+     */
+    public void changeLoanStatus(int loanId, int status) throws EJBException {
+
+        Context context = null;
+       
+       try{
+           context = new InitialContext();
+           LoanHomeLocal loanHome = (LoanHomeLocal)context.lookup(LoanHomeLocal.COMP_NAME);
+           LoanLocal loan = loanHome.findByPrimaryKey(new Integer(loanId));
+           loan.setLoanStatus(new Integer(status));// Status Changed
+           
+       }catch (Exception e){
+           e.printStackTrace();
+       }finally {
+           if(context != null){
+               try {
+                   context.close();
+               } catch (NamingException e1) {
+                   e1.printStackTrace();
+               }
+           }
+       }
+    }
+
+}
\ No newline at end of file

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,22 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Home interface for LoanManager.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanManagerHome
+   extends javax.ejb.EJBHome
+{
+   public static final String COMP_NAME="java:comp/env/ejb/LoanManager";
+   public static final String JNDI_NAME="org.apache.geronimo.samples.loan.ejb.LoanManager";
+
+   public org.apache.geronimo.samples.loan.ejb.LoanManager create()
+      throws javax.ejb.CreateException,java.rmi.RemoteException;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerHome.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,23 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Local interface for LoanManager.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanManagerLocal
+   extends javax.ejb.EJBLocalObject
+{
+
+   public java.util.Collection lisLoans(  ) throws javax.ejb.EJBException;
+
+   public void registerLoan( org.apache.geronimo.samples.loan.dto.LoanDTO dto ) throws javax.ejb.EJBException;
+
+   public void changeLoanStatus( int loanId,int status ) throws javax.ejb.EJBException;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocal.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,22 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.loan.ejb;
+
+/**
+ * Local home interface for LoanManager.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface LoanManagerLocalHome
+   extends javax.ejb.EJBLocalHome
+{
+   public static final String COMP_NAME="java:comp/env/ejb/LoanManagerLocal";
+   public static final String JNDI_NAME="LoanManager";
+
+   public org.apache.geronimo.samples.loan.ejb.LoanManagerLocal create()
+      throws javax.ejb.CreateException;
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/ejb/LoanManagerLocalHome.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,46 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.geronimo.samples.loan.util;
+
+import java.io.IOException;
+import java.util.Properties;
+
+public class PropertyLoader {
+    
+    private static PropertyLoader instance;
+    private Properties properties;
+
+    private PropertyLoader(String fileName) {
+        try {
+            properties = new Properties();
+            properties.load(this.getClass().getClassLoader().getResourceAsStream(fileName));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public static PropertyLoader getInstance(String fileName){
+        if(instance == null){
+            instance = new PropertyLoader(fileName);
+        }
+        return instance;
+    }
+    
+    public String getValue(String key){
+        return (String)properties.get(key);
+    }
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/util/PropertyLoader.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java Fri Apr 11 13:48:31 2008
@@ -0,0 +1,178 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.geronimo.samples.loan.web;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.loan.dto.LoanDTO;
+import org.apache.geronimo.samples.loan.ejb.LoanManagerLocal;
+import org.apache.geronimo.samples.loan.ejb.LoanManagerLocalHome;
+
+public class LoanManagerDispatchServlet extends HttpServlet {
+
+    /**
+     * Constructor of the object.
+     */
+    public LoanManagerDispatchServlet() {
+        super();
+    }
+
+    /**
+     * Destruction of the servlet. <br>
+     */
+    public void destroy() {
+        super.destroy(); // Just puts "destroy" string in log
+    }
+
+    /**
+     * The doGet method of the servlet. <br>
+     *
+     * This method is called when a form has its tag value method equals to get.
+     * 
+     * @param request the request send by the client to the server
+     * @param response the response send by the server to the client
+     * @throws ServletException if an error occurred
+     * @throws IOException if an error occurred
+     */
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        
+        String page = request.getServletPath();        
+        if(page.equals("/register")){
+            registerLoan(request, response);
+        }else if(page.equals("/listLoans")){
+            listLoans(request, response);
+        }
+    }
+
+    /**
+     * The doPost method of the servlet. <br>
+     *
+     * This method is called when a form has its tag value method equals to post.
+     * 
+     * @param request the request send by the client to the server
+     * @param response the response send by the server to the client
+     * @throws ServletException if an error occurred
+     * @throws IOException if an error occurred
+     */
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        doGet(request, response);
+    }
+
+    /**
+     * Initialization of the servlet. <br>
+     *
+     * @throws ServletException if an error occure
+     */
+    public void init() throws ServletException {       
+    }
+    
+    private void registerLoan(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{
+        String path = "/jsp/error.jsp";
+        String error = null;
+        
+        String customerName = null;
+        double loanAmount = 0;
+        double yearlySalary = 0;
+        String address = null;
+        
+        boolean isMissingField = true;
+        
+        try {
+            customerName = req.getParameter("customerName");
+            loanAmount = Double.parseDouble(req.getParameter("loanAmount"));
+            yearlySalary = Double.parseDouble(req.getParameter("annualSalary"));
+            address = req.getParameter("address");
+            isMissingField = false;
+            
+        } catch (RuntimeException e) {
+           error = "Missing/Invalid required field : ";
+           
+           if(customerName == null){
+               error += ("Customer Name : "+e.getMessage());
+           }else if(address == null){
+               error += ("Address : "+e.getMessage());
+           }else if (loanAmount == 0){
+               error += ("Loan Amount : "+e.getMessage());
+           }else if(yearlySalary == 0){
+               error += ("Annual Salary : "+e.getMessage());
+           }
+        }
+        
+        if(!isMissingField){
+            try {
+                Context context = new InitialContext();
+                LoanManagerLocalHome loanHome = (LoanManagerLocalHome)context.lookup(LoanManagerLocalHome.COMP_NAME);
+                LoanManagerLocal loanManager = loanHome.create();
+                
+                LoanDTO dto = new LoanDTO();
+                dto.setCustomerName(customerName);
+                dto.setLoanAmount(loanAmount);
+                dto.setAddress(address);
+                dto.setAnnualSalary(yearlySalary);
+                
+                loanManager.registerLoan(dto);
+                path = "/jsp/index.jsp";
+            } catch (Exception e) {
+                e.printStackTrace();
+                error = "Error occured in EJB Layer "+e.getMessage();
+            }
+        }
+        
+        if(error != null){
+            req.setAttribute("error", error);
+        }
+        
+        getServletContext().getRequestDispatcher(path).forward(req, res);
+    }
+    
+    private void listLoans(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{
+        String path = "/jsp/error.jsp";
+        String error = null;
+        
+        try {
+            Context context = new InitialContext();
+            LoanManagerLocalHome loanHome = (LoanManagerLocalHome)context.lookup(LoanManagerLocalHome.COMP_NAME);
+            LoanManagerLocal loanManager = loanHome.create();
+            
+            Collection customerList = loanManager.lisLoans();
+            
+            req.setAttribute("loansList", customerList);
+        
+            path = "/jsp/list_loans.jsp";
+        } catch (Exception e) {
+            e.printStackTrace();
+            error = "Error occured in EJB Layer "+e.getMessage();
+        }
+        
+        if(error != null){
+            req.setAttribute("error", error);
+        }
+        
+        getServletContext().getRequestDispatcher(path).forward(req, res);
+    }
+
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/src/org/apache/geronimo/samples/loan/web/LoanManagerDispatchServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml Fri Apr 11 13:48:31 2008
@@ -0,0 +1,36 @@
+<?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/j2ee/web-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
+  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+    <dep:moduleId>
+      <dep:groupId>org.apache.geronimo.samples</dep:groupId>
+      <dep:artifactId>LoanManagerWeb</dep:artifactId>
+      <dep:version>1.0</dep:version>
+      <dep:type>car</dep:type>
+    </dep:moduleId>
+    <dep:dependencies/> 
+    <dep:hidden-classes/>
+    <dep:non-overridable-classes/>
+  </dep:environment>
+ 
+  <naming:ejb-local-ref>
+      <naming:ref-name>ejb/LoanManagerLocal</naming:ref-name>
+      <naming:ejb-link>LoanManager</naming:ejb-link>
+  </naming:ejb-local-ref>
+    
+</web-app>
\ No newline at end of file

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml Fri Apr 11 13:48:31 2008
@@ -0,0 +1,27 @@
+<?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.
+-->
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+    <ejb-local-ref>
+        <ejb-ref-name>ejb/LoanManagerLocal</ejb-ref-name>
+        <local-jndi-name>LoanManager</local-jndi-name>
+    </ejb-local-ref>  
+</jboss-web>
+

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/jboss-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml Fri Apr 11 13:48:31 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.
+-->
+<web-app version="2.4" 
+    xmlns="http://java.sun.com/xml/ns/j2ee" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
+    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+  <servlet>
+    <description>LoanManagerDispatchServlet</description>
+    <display-name>LoanManagerDispatchServlet</display-name>
+    <servlet-name>LoanManagerDispatchServlet</servlet-name>
+    <servlet-class>org.apache.geronimo.samples.loan.web.LoanManagerDispatchServlet</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>LoanManagerDispatchServlet</servlet-name>
+    <url-pattern>/register</url-pattern>
+  </servlet-mapping>
+ 
+  <servlet-mapping>
+    <servlet-name>LoanManagerDispatchServlet</servlet-name>
+    <url-pattern>/listLoans</url-pattern>
+  </servlet-mapping>
+ 
+  <ejb-local-ref>
+    <ejb-ref-name>ejb/LoanManagerLocal</ejb-ref-name>
+    <ejb-ref-type>Session</ejb-ref-type>
+        <local-home>
+            org.apache.geronimo.samples.loan.ejb.LoanManagerLocalHome
+        </local-home>
+        <local>
+            org.apache.geronimo.samples.loan.ejb.LoanManagerLocal
+        </local>
+        <ejb-link>LoanManager</ejb-link>
+  </ejb-local-ref>
+  
+  <welcome-file-list>
+    <welcome-file>/jsp/index.jsp</welcome-file>
+  </welcome-file-list>
+
+</web-app>

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css Fri Apr 11 13:48:31 2008
@@ -0,0 +1,510 @@
+/*
+* 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.
+*/
+body 
+{
+    /*background-color: #FFFFFF;*/
+}
+
+.BrightTitle
+{
+    color: #FFFFFF;
+    background-color: #5FA3D6;
+    font-size: 11px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+}
+
+.BrightTitle a:hover
+{
+    color: #5FA3D6;
+}
+
+.BrightBox
+{
+    border: thin solid #5FA3D6;
+}
+
+td
+{
+    font-size: 11px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+}
+
+a:link, a:visited
+{
+    color: #204486;
+}
+
+a:hover 
+{
+    /*color: #5FA3D6;*/
+    color: #CF820A;
+}
+
+.Logo
+{
+    background-image:url("images/head_left_754x86.gif");
+    background-repeat: no-repeat;
+    width: 570px;
+    height: 86px;
+    font-size: 35px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    text-align: right;
+    vertical-align: bottom; 
+    line-height: 30px;
+    font-weight: bold;
+}
+
+.LoginLogo
+{
+    background-image:url("images/head_left_login_586x86.gif");
+    background-repeat: no-repeat;
+    width: 570px;
+    height: 86px;
+    font-size: 35px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    text-align: right;
+    vertical-align: bottom; 
+    line-height: 30px;
+    font-weight: bold;
+}
+
+.Top
+{
+    background-image:url("images/head_bgstretch_1x86.gif");
+    background-repeat: repeat-x;
+    height: 86px;
+    font-size: 11px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    text-align: right;
+    vertical-align: bottom;
+    font-weight: bold;
+}
+
+.Top a:link, .Top a:visited, .Top a:hover
+{
+        color: #FFFFFF;
+        font-size: 11px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+        text-decoration: underline;
+        text-align: left;
+        vertical-align: bottom;
+        line-height: 30px;
+        font-weight: bold;
+}
+
+.TopSpacer
+{
+    height: 20px;
+}
+
+.Hidden
+{
+    visibility: hidden;
+    height: 0px;
+    line-height: 0px;
+    display: none;
+}
+
+.Menu .Selection
+{
+        background-color: #F2F2F2;
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+}
+
+.Menu .Selection .CollapsedLeft
+{
+    width: 12px;
+    height: 12px;
+    color: #000000;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .Indent
+{
+    width: 2px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .CollapsedRight
+{
+    width: 8px;
+    height: 12px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .TopLeft
+{
+    width: 8px;
+    height: 16px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .TopMiddle
+{
+    color: #000000;
+    text-decoration: none;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .TopMiddle a:link, 
+.Menu .Selection .TopMiddle a:visited, 
+{
+    color: #000000;
+    line-height: 20px;
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .TopMiddle a:hover
+{
+    color: #5FA3D6;
+}
+
+.Menu .Selection .TopRight
+{
+    width: 8px;
+    height: 16px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Selection .Spacer
+{
+    height: 5px;
+}
+
+.Menu .Hidden
+{
+    visibility: hidden;
+    height: 0px;
+    display: none;
+}
+
+.Menu .Subselection .Left
+{
+    width: 12px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Subselection .Indent
+{
+    width: 2px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Subselection .Middle
+{
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+        background-color: #F2F2F2;
+    color:#000000;
+}
+
+.Menu .Subselection .Middle a:link, 
+.Menu .Subselection .Middle a:visited, 
+{
+    line-height: 20px;
+    color: #000000;
+}
+
+.Menu .Subselection .Middle a:hover
+{
+    color: #5FA3D6;
+}
+
+.Menu .Subselection .Right
+{
+    width: 8px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Subselection .BottomLeft
+{
+    width: 8px;
+    height: 8px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Subselection .BottomMiddle
+{
+    height: 8px;
+        background-color: #F2F2F2;
+}
+
+.Menu .Subselection .BottomRight
+{
+    width: 8px;
+    height: 8px;
+        background-color: #F2F2F2;
+}
+
+.Menu .SelectedSubselection .Middle a{
+    color: #000;
+    text-decoration: none;
+}
+
+.Menu .SelectedSubselection .Middle a:hover{
+    color: #000;
+    text-decoration: underline;
+}
+
+.Gutter
+{
+    width: 5px;
+}
+
+.Content .TopLeft
+{
+    width: 18px;
+    height: 18px;
+    line-height: 18px;
+        background-color: #000000;
+}
+
+.Content .Title
+{
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    background-color: #000000;
+    color: #FFFFFF;
+    height: 18px;
+    line-height: 18px;
+}
+
+.Content .Title a:link, .Content .Title a:hover, .Content .Title a:visited
+{
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    background-color: #000000;
+    color: #FFFFFF;
+    height: 18px;
+    line-height: 18px;
+}
+
+.Content .Title .Indent
+{
+    width: 20px;
+}
+
+.Content .TopRight
+{
+    width: 18px;
+    height: 18px;
+        background-color:#000000;
+}
+
+.Content .CollapsedLeft
+{
+    width: 18px;
+    height: 18px;
+        background-color:#000000;
+}
+
+.Content .CollapsedRight
+{
+    width: 18px;
+    height: 18px;
+        background-color:#000000;
+}
+
+.Content .Left
+{
+    width: 18px;
+    background-color: #FFFFFF;
+}
+
+.Content .Body, .Content .Body td
+{
+    font-size: 12px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    background-color: #FFFFFF;
+    color: #1E1E52;
+}
+
+.Content .Body strong
+{
+    font-weight: bold;  
+    font-size: 12px;
+}
+
+.Content .Body th
+{
+    font-weight: bold;  
+    font-size: 12px;
+}
+
+.Content .Body .LightBackground
+{
+        background-color: #FFFFFF;
+    color:#000000;
+}
+
+.Content .Body .LightBackground .InputField
+{
+  width: 150px;
+}
+
+.Content .Body .MediumBackground
+{
+    background-color: #F2F2F2;
+    color:#000000;
+}
+
+.Content .Body .DarkBackground, 
+.Content .Body .DarkBackground a:link, 
+.Content .Body .DarkBackground a:visited,
+.Content .Body .DarkBackground a:hover
+{
+    background-color: #2581C7;
+    color:#FFFFFF;
+    font-size: 15px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+}
+
+.Content .Body .reallyDarkBackground,
+.Content .ReallyDarkBackground,
+.ReallyDarkBackground
+{
+    color: #FFFFFF;
+    background-color: #000000;
+    font-size: 15px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+}
+
+.Content .Body .IndentedTitle
+{
+    background-color: #919FBC;
+    color:#FFFFFF;
+}
+
+.Content .Body .LightIndentedBG
+{
+    background-color: #FFFFFF;
+    color:#000000;
+}
+
+.Content .Body .MediumIndentedBG
+{
+    background-color: #DDDDDD;
+    color:#000000;
+}
+
+
+.Content .Body a:link,
+.Content .Body a:visited,
+{
+    font-size: 10px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    text-decoration: underline;
+    color: #546BC7;
+    font-weight: bold;
+}
+
+.Content .Body a:hover
+{
+    color: #5FA3D6;
+}
+
+.Content .Buttons {
+    border-top-width: thin;
+    border-right-width: thin;
+    border-bottom-width: thin;
+    border-left-width: thin;
+    border-top-style: solid;
+    border-right-style: solid;
+    border-bottom-style: solid;
+    border-left-style: solid;
+    border-top-color: #7B7BAE;
+    border-right-color: #7B7BAE;
+    border-bottom-color: #141336;
+    border-left-color: #141336;
+    background-color: #23224C;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    font-size: 12px;
+  text-decoration: underline;
+    color: #5FA3D6;
+}
+
+.Content .Right
+{
+    width: 18px;
+    background-color: #FFFFFF;
+}
+
+.Content .BottomLeft
+{
+    width: 18px;
+    height: 12px;
+    line-height: 12px;
+    background-color:#333366;
+}
+
+.Content .Footer
+{
+    line-height: 12px;
+    height: 12px;
+    font-size: 9px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    background-color:#333366;
+    color:#000000;
+}
+
+.Content .Footer a:link,
+.Content .Footer a:visited,
+.Content .Footer a:hover
+{
+    color: #5FA3D6;
+}
+
+.Content .BottomRight
+{
+    width: 18px;
+    line-height: 12px;
+    height: 12px;
+    background-color:#333366;
+}
+
+.Content .Spacer
+{
+    height: 10px;
+}
+
+.BottomSpacer
+{
+}
+
+.Footer
+{
+    font-size: 9px;
+    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
+    height: 20px;
+    background-color: #5FA3D6;
+}
+
+.Footer a:link, 
+.Footer a:visited, 
+.Footer a:hover
+{
+    color: #5FA3D6;
+    text-decoration: underline; 
+}
+
+.Box
+{
+    border: thin solid #000000;
+}

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/css/main.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp?rev=647303&view=auto
==============================================================================
--- geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp (added)
+++ geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp Fri Apr 11 13:48:31 2008
@@ -0,0 +1,60 @@
+<!--
+  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.
+-->
+<html>
+<head>
+<title>Error Occured</title>
+<link rel="stylesheet" href="css/main.css" type="text/css">
+</head>
+<body>
+    <div align="center" class="Content">
+        <table>
+            <tr>
+                <td class="Title"><strong>An Error Occured</strong></td>
+            </tr>
+            <tr></tr>
+            <tr>
+                <td class="Body">
+                    <p>
+                        Following error occured while executing your request.
+                    </p>
+                </td>
+            </tr>
+            <tr>
+                <td class="Body">
+                    <div align="center" class="Content">
+                        <table>
+                            <tr>
+                                <td align="right" class="MediumBackground"><strong><%=request.getAttribute("error")%></strong></td>
+                            </tr>
+                        </table>
+                    </div>
+                </td>               
+            </tr>
+            <tr>
+                <td class="MediumBackground"></td>
+            </tr>
+        </table>
+        <a href="listLoans">
+            <table>
+                <tr>
+                    <td class="MediumBackground"><strong>Home</strong></td>
+                </tr>
+            </table>
+        </a>
+    </div>
+</body>
+</html>
\ No newline at end of file

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/branches/2.0/migration-ejb-bmp/web/jsp/error.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain