Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 28499 invoked from network); 12 Mar 2008 22:01:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2008 22:01:01 -0000 Received: (qmail 64936 invoked by uid 500); 12 Mar 2008 22:00:58 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 64894 invoked by uid 500); 12 Mar 2008 22:00:58 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 64885 invoked by uid 99); 12 Mar 2008 22:00:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2008 15:00:58 -0700 X-ASF-Spam-Status: No, hits=-1998.0 required=10.0 tests=ALL_TRUSTED,URIBL_BLACK X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2008 22:00:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C3A2C1A984E; Wed, 12 Mar 2008 15:00:27 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r636529 [3/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 -0000 To: scm@geronimo.apache.org From: ecraig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080312220027.C3A2C1A984E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,87 @@ + + + + + 3 + + entity-ejb + EntityEJB + cmpdemo + cmp + + + src + + + + + geronimo + geronimo-deployment-plugin + 1.0-M5 + plugin + + + + + geronimo-spec + geronimo-spec-ejb + 2.1-rc4 + jar + + + + + openejb + openejb-core + 2.0-G1M5 + + + + + + geronimo-spec + geronimo-spec-j2ee + 1.4-rc4 + + + + + + geronimo + geronimo-kernel + 1.0-M5 + + + + + + geronimo + geronimo-security + 1.0-M5 + + + + + + cglib + cglib-nodep + 2.1 + + + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/project.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.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. +*/ +/* + * Created on Sep 27, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package com.ibm.demo.entity.client; + +/** + * @author cpineda + * + * TODO To change the template for this generated type comment go to Window - + * Preferences - Java - Code Style - Code Templates + */ +import java.rmi.RemoteException; +import java.util.Date; + +import javax.naming.InitialContext; +import javax.naming.Context; +import javax.naming.NamingException; +import javax.rmi.PortableRemoteObject; +import com.ibm.demo.entity.cmp.*; + +public class EntityBeanClient { + + public static void main(String[] arg) { + try { + Context jndiContext = getInitialContext(); + + String name = "CustomerHomeRemote"; + + Object ref = jndiContext.lookup(name); + System.out.println("creating home..."); + CustomerHomeRemote home = (CustomerHomeRemote) PortableRemoteObject + .narrow(ref, CustomerHomeRemote.class); + CustomerRemote customerRemote = null; + System.out.println("creating customer..."); + try{ + System.out.println("INSERTING RECORD :"+ "1, Customer 1, 11/11/11, 2323232 , NO INFO, "+ new Double(0.0)+" , "+new Double(0.0)); + customerRemote = home.create(new Integer(1), "Customer 1", new Date("11/11/11"), "2323232", "NO INFO", new Double(0.0),new Double(0.0)); + System.out.println("DONE WITH THE INSERT"); + }catch(Exception e){/* this will most likely be because the customer already exists in the database. */ + + } + System.out.print("done."); + + System.out.println("findByPrimaryKeyTest... 1"); + customerRemote = null; + customerRemote = home.findByPrimaryKey(new Integer(1)); + System.out.println("customer name: "+customerRemote.getName()); + System.out.println("customer sss no: "+customerRemote.getSssNo()); + System.out.println("customer loan amount: "+customerRemote.getLoanAmount()); + System.out.println("customer annual salary: "+customerRemote.getAnnualSalary()); + System.out.println("customer birthdate: "+customerRemote.getBirthdate()); + + System.out.println("updating ejb..."); + customerRemote.setName("Customer 2"); + System.out.print("done."); + + System.out.println("findBySssNoTest... 2323232"); + customerRemote = null; + customerRemote = home.findBySssNo("2323232"); + System.out.println("customer name: "+customerRemote.getName()); + System.out.println("customer sss no: "+customerRemote.getSssNo()); + System.out.println("customer loan amount: "+customerRemote.getLoanAmount()); + System.out.println("customer annual salary: "+customerRemote.getAnnualSalary()); + System.out.println("customer birthdate: "+customerRemote.getBirthdate()); + + customerRemote.remove(); + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + public static Context getInitialContext() + throws javax.naming.NamingException { + return new javax.naming.InitialContext(); + } +} \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/client/EntityBeanClient.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java Wed Mar 12 14:54:41 2008 @@ -0,0 +1,252 @@ +/* +* 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.cmp; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Date; +import java.util.Collection; +import java.util.ArrayList; + +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 abstract 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,Date birthdate,String sssNo,String address, + Double annualSalary,Double loanAmount) throws CreateException{ + setId(id); + setName(name); + setBirthdate(birthdate); + setSssNo(sssNo); + setAddress(address); + setAnnualSalary(annualSalary); + setLoanAmount(loanAmount); + + return id; + } + + /** + * + * @param id + * @return @throws + * CreateException + */ + /** + * + * @param id + * @return @throws + * CreateException + */ + public Integer ejbCreate(Integer id) throws CreateException { + + setId(id); + return id; + } + + + /** + * + * @param id + * @param name + * @param sssNo + * @param address + * @param birthdate + * @param annualSalary + * @param loanAmount + */ + public void ejbPostCreate(Integer id, String name,Date birthdate,String sssNo,String address, + 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; + } + + + public void ejbActivate() { + // Not implemented. + } + + public void ejbPassivate() { + // Not implemented. + } + + public void ejbLoad() { + + + } + + public void ejbStore() { + + } + + public void ejbRemove() {} + + /** + * @return Returns the address. + */ + public abstract String getAddress(); + + /** + * @param address + * The address to set. + */ + public abstract void setAddress(String address); + + /** + * @return Returns the annualSalary. + */ + public abstract Double getAnnualSalary(); + + /** + * @param annualSalary + * The annualSalary to set. + */ + public abstract void setAnnualSalary(Double annualSalary); + + /** + * @return Returns the birthdate. + */ + public abstract Date getBirthdate(); + + /** + * @param birthdate + * The birthdate to set. + */ + public abstract void setBirthdate(Date birthdate); + + /** + * @return Returns the loanAmount. + */ + public abstract Double getLoanAmount(); + + /** + * @param loanAmount + * The loanAmount to set. + */ + public abstract void setLoanAmount(Double loanAmount); + + /** + * @return Returns the name. + */ + public abstract String getName(); + + /** + * @param name + * The name to set. + */ + public abstract void setName(String name); + + /** + * @return Returns the sssNo. + */ + public abstract String getSssNo(); + + /** + * @param sssNo + * The sssNo to set. + */ + public abstract void setSssNo(String sssNo); + + + /** + * @return Returns the ID. + */ + public abstract Integer getId(); + + /** + * @param Id + * The Id to set. + */ + public abstract void setId(Integer id); + +} \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerBean.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java Wed Mar 12 14:54:41 2008 @@ -0,0 +1,90 @@ +/* +* 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.cmp; + +import java.rmi.RemoteException; +import java.util.Date; +import java.util.Collection; + +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,Date birthdate,String sssNo,String address, + 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; + + public Collection findAll() 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-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerHomeRemote.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/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.cmp; + +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-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/cmp/CustomerRemote.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.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.entity.servlet; + +import com.ibm.demo.entity.cmp.*; + +import javax.servlet.ServletException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.naming.InitialContext; +import javax.rmi.PortableRemoteObject; + +import java.text.SimpleDateFormat; + +import java.io.IOException; + +/** + * Created by IntelliJ IDEA. + * User: simon + * Date: Nov 13, 2004 + * Time: 10:07:03 AM + * To change this template use File | Settings | File Templates. + */ +public class PublisherServlet extends javax.servlet.http.HttpServlet { + + private ServletContext ctx; + + public void init() throws ServletException { + + this.ctx = getServletContext(); + } + + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + doGet(request, response); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + RequestDispatcher rd = null; + + try { + InitialContext jndiContext = new InitialContext(); + + String name = "java:comp/env/ejb/CustomerHome"; + + Object ref = jndiContext.lookup(name); + CustomerHomeRemote home = (CustomerHomeRemote) PortableRemoteObject.narrow(ref, CustomerHomeRemote.class); + CustomerRemote customerRemote = null; + System.out.println("creating customer..."); + try{ + Integer customerID = new Integer(request.getParameter("clientID")); + String customerName = request.getParameter("clientName"); + String customerSSS = request.getParameter("clientSSS"); + String customerAddress = request.getParameter("clientSSS"); + String birthdate = request.getParameter("clientBirthdate"); + Double customerSalary = new Double(request.getParameter("clientSalary")); + Double customerLoan = new Double(request.getParameter("loanAmt")); + + customerRemote = home.create(customerID,customerName,new SimpleDateFormat("mm/dd/yyyy").parse(birthdate),customerSSS,customerAddress,customerSalary,customerLoan); + }catch(Exception e){/* this will most likely be because the customer already exists in the database. */ } + + rd = ctx.getRequestDispatcher("/list.jsp"); + rd.forward(request, response); + } + catch(Exception e) { + throw new ServletException(e); + } + } +} Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/com/ibm/demo/entity/servlet/PublisherServlet.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,30 @@ + + + + + entity-ejb + + + ejb/CustomerHome + geronimo.server:EJBModule=CustomerEJB,J2EEApplication=null,J2EEServer=geronimo,j2eeType=EntityBean,name=CustomerEJB + + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,23 @@ + + + + + ejb/CustomerHome + CustomerHomeRemote + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/jboss-web.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,48 @@ + + + + Gluecode Standard Edition JMS demo + + + publisher + publisher + com.ibm.demo.entity.servlet.PublisherServlet + 1 + + + + publisher + /publish + + + + ejb/CustomerHome + Entity + com.ibm.demo.entity.cmp.CustomerHomeRemote + com.ibm.demo.entity.cmp.CustomerRemote + + + + + list.jsp + + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp Wed Mar 12 14:54:41 2008 @@ -0,0 +1,57 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Create a Customer
Customer ID (Integer):
Full Name:
SSS Number:
Address:
Birthdate:
Annual Salary:
Loan Amount:
List Customers
+
Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/create.jsp ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp (added) +++ geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp Wed Mar 12 14:54:41 2008 @@ -0,0 +1,75 @@ + +<%@ page import="java.util.*" %> +<%@ page import="javax.naming.*" %> +<%@ page import="com.ibm.demo.entity.cmp.*" %> +<%@ page import="javax.rmi.PortableRemoteObject" %> + +<% +Context ctx = new InitialContext(); +String name = "java:comp/env/ejb/CustomerHome"; +System.out.println("in List.jsp"); +Object ref = ctx.lookup(name); +CustomerHomeRemote home = (CustomerHomeRemote) PortableRemoteObject.narrow(ref, CustomerHomeRemote.class); +CustomerRemote customerRemote = null; +Collection customers = home.findAll(); +%> + + + + + + + + + + + + + + +<% +for(Iterator i = customers.iterator(); i.hasNext(); ){ + customerRemote=(CustomerRemote)i.next(); +%> + + + + + + + + +<% +} +%> + + + +
Customers
NAMESSS NO.ADDRESSBIRTHDATEANNUAL SALARYLOAN AMOUNT
+ <%=customerRemote.getName()%> + + <%=customerRemote.getSssNo()%> + + <%=customerRemote.getAddress()%> + + <%=customerRemote.getBirthdate()%> + + <%=customerRemote.getAnnualSalary()%> + + <%=customerRemote.getLoanAmount()%> +
Add Customer
\ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-cmp/src/webapp/list.jsp ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt Wed Mar 12 14:54:41 2008 @@ -0,0 +1,350 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] The Apache Software Foundation + + Licensed 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. + +========================================================================= +J2G, Commons Logging, commons-el, jasper-runtime, jasper-compiler, +jasper-compiler-jdt, geronimo-jsp_spec, and geronimo-servlet-spec use the +above Apache License v2.0. +========================================================================= + +========================================================================= +== Dom4j License == +========================================================================= + +Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. + +Redistribution and use of this software and associated documentation +("Software"), with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain copyright + statements and notices. Redistributions must also contain a + copy of this document. + +2. Redistributions in binary form must reproduce the + above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +3. The name "DOM4J" must not be used to endorse or promote + products derived from this Software without prior written + permission of MetaStuff, Ltd. For written permission, + please contact dom4j-info@metastuff.com. + +4. Products derived from this Software may not be called "DOM4J" + nor may "DOM4J" appear in their names without prior written + permission of MetaStuff, Ltd. DOM4J is a registered + trademark of MetaStuff, Ltd. + +5. Due credit should be given to the DOM4J Project - + http://www.dom4j.org + +THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================= +== Jaxen License == +========================================================================= + + Copyright 2003-2006 The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================= +== PullParser License == +========================================================================= + +Copyright 2002 The Trustees of Indiana University. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1) All redistributions of source code must retain the above + copyright notice, the list of authors in the original source + code, this list of conditions and the disclaimer listed in this + license; + +2) All redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the disclaimer + listed in this license in the documentation and/or other + materials provided with the distribution; + +3) Any documentation included with all redistributions must include + the following acknowledgement: + + "This product includes software developed by the Indiana + University Extreme! Lab. For further information please visit + http://www.extreme.indiana.edu/" + + Alternatively, this acknowledgment may appear in the software + itself, and wherever such third-party acknowledgments normally + appear. + +4) The name "Indiana Univeristy" and "Indiana Univeristy + Extreme! Lab" shall not be used to endorse or promote + products derived from this software without prior written + permission from Indiana University. For written permission, + please contact http://www.extreme.indiana.edu/. + +5) Products derived from this software may not use "Indiana + Univeristy" name nor may "Indiana Univeristy" appear in their name, + without prior written permission of the Indiana University. + +Indiana University provides no reassurances that the source code +provided does not infringe the patent or any other intellectual +property rights of any other entity. Indiana University disclaims any +liability to any recipient for claims brought by any other entity +based on infringement of intellectual property rights or otherwise. + +LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH +NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA +UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT +SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR +OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT +SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP +DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE +RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, +AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING +SOFTWARE. + + + + + Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/LICENSE.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt Wed Mar 12 14:54:41 2008 @@ -0,0 +1,46 @@ +========================================================================= +== NOTICE file corresponding to section 4(d) of the Apache License, == +== Version 2.0, in this case for the Apache Geronimo distribution. == +========================================================================= + +Apache Geronimo +Copyright 2003-2007 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +Portions of the J2G Conversion Tool were orginally developed by International +Business Machines Corporation and are licensed to the Apache Software +Foundation under the "Software Grant and Corporate Contribution License +Agreement", informally known as the "IBM Console CLA". + +========================================================================= +== Commons-logging Notice == +========================================================================= +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + + +========================================================================= +== Dom4j Notice == +========================================================================= + +Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. + +========================================================================= +== Jaxen Notice == +========================================================================= + +Copyright 2003-2006 The Werken Company. All Rights Reserved. + +========================================================================= +== PullParser Notice == +========================================================================= + +Copyright 2002 The Trustees of Indiana University. +All rights reserved. + +This product includes software developed by the Indiana +University Extreme! Lab. For further information please visit +http://www.extreme.indiana.edu/ + Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/NOTICE.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,56 @@ + + + + MDB + + + + This bean represents customer + CustomerEJB + com.ibm.demo.entity.bmp.CustomerHomeRemote + com.ibm.demo.entity.bmp.CustomerRemote + com.ibm.demo.entity.bmp.CustomerBean + Bean + java.lang.Integer + false + primaryKey + + DataSource for Demo Database + jdbc/ibm-demo + javax.sql.DataSource + Container + + + + + SampleMDB + SampleMDB + com.ibm.demo.mdb.ejb.SampleMDB + javax.jms.MessageListener + Container + javax.jms.Queue + SendReceiveQueue + + CustomerHomeRemote + Entity + com.ibm.demo.entity.bmp.CustomerHomeRemote + com.ibm.demo.entity.bmp.CustomerRemote + + + + Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/ejb-jar.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,37 @@ + + + + + + CustomerEJB + CustomerHomeRemote + + jdbc/ibm-demo + java:/DefaultDS + + + + SampleMDB + queue/testQueue + + CustomerHomeRemote + CustomerHomeRemote + + + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/jboss.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,58 @@ + + + + + + SampleMDB + + geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=org/apache/geronimo/SystemJMS,j2eeType=JCAResourceAdapter,name=ActiveMQ RA + + + + destination + SendReceiveQueue + + + destinationType + javax.jms.Queue + + + + CustomerHomeRemote + CustomerEJB + + + + + CustomerEJB + CustomerHomeRemote + + + jdbc/ibm-demo + SystemDatasource + + + + + + \ No newline at end of file Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/dd/META-INF/openejb-jar.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,30 @@ + + + + + + + + + + Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/maven.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties Wed Mar 12 14:54:41 2008 @@ -0,0 +1,22 @@ +# 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.multiproject.type=ejb +maven.ejb.src=dd + +maven.war.classes.includes=com/ibm/demo/mdb/servlet/** +#maven.war.classes.excludes= + +maven.jboss.home=c:\jboss-4.0.2 Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.properties ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml Wed Mar 12 14:54:41 2008 @@ -0,0 +1,57 @@ + + + + 3 + + messaging-ejb + Message Driven Bean Example + ejbdemo + SNAPSHOT + + + + geronimo-spec + geronimo-spec-ejb + 2.1-rc4 + jar + + + geronimo-spec + geronimo-spec-servlet + 2.4-rc4 + jar + + + geronimo-spec + geronimo-spec-jms + 1.1-rc4 + jar + + + activemq + activemq-core + 3.2 + jar + + + + + src + + + Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/project.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java?rev=636529&view=auto ============================================================================== --- geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java (added) +++ geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java Wed Mar 12 14:54:41 2008 @@ -0,0 +1,104 @@ +/* +* 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 Oct 11, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package com.ibm.demo.mdb.client; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Properties; + +import javax.jms.MessageProducer; +import javax.jms.Queue; +import javax.jms.QueueConnection; +import javax.jms.QueueConnectionFactory; +import javax.jms.QueueSender; +import javax.jms.QueueSession; +import javax.jms.Session; +import javax.jms.TextMessage; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingEnumeration; + +import org.activemq.ActiveMQConnection; +import org.activemq.ActiveMQConnectionFactory; +import org.activemq.ActiveMQMessageProducer; + +/** + * @author exist_user2 + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class MessageSenderAMQ { + + public static void main(String[] args) throws Exception { + + ActiveMQConnectionFactory connectionFactory = + new ActiveMQConnectionFactory("tcp://localhost:61616"); + + QueueConnection connection = (QueueConnection)connectionFactory.createConnection(); + + try { + Session session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE); + Queue queue = session.createQueue("SendReceiveQueue"); + MessageProducer sender = session.createProducer(queue); + TextMessage message = session.createTextMessage("add customer"); + + // Get text from standard input. + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + String t = null; + // Prompt user for information and add to message properties. + System.out.println("Enter information for new customer."); + System.out.print("Enter customer id (Integer):"); + t = br.readLine(); + message.setIntProperty("customerID",Integer.parseInt(t)); + System.out.print("Enter name:"); + t = br.readLine(); + message.setStringProperty("customerName",t); + System.out.print("Enter sss number:"); + t = br.readLine(); + message.setStringProperty("customerSSS",t); + System.out.print("Enter address:"); + t = br.readLine(); + message.setStringProperty("customerAddress",t); + System.out.print("Enter birhtdate (mm/dd/yyyy):"); + t = br.readLine(); + message.setStringProperty("birthdate", t); + System.out.print("Enter annual salary:"); + t = br.readLine(); + message.setDoubleProperty("customerSalary", Double.parseDouble(t)); + System.out.print("Enter loan amount:"); + t = br.readLine(); + message.setDoubleProperty("customerLoan", Double.parseDouble(t)); + + + sender.send(message); + System.out.println("Message sent."); + + } finally { + connection.close(); + } + } + +} Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/branches/1.0/migration-ejb-mdb/src/client/com/ibm/demo/mdb/client/MessageSenderAMQ.java ------------------------------------------------------------------------------ svn:mime-type = text/plain