[jboss-svn-commits] JBL Code SVN: r36319 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance: results and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Dec 9 13:59:57 EST 2010


Author: whitingjr
Date: 2010-12-09 13:59:57 -0500 (Thu, 09 Dec 2010)
New Revision: 36319

Added:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerConfig.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerManagement.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ORMInitialiseDB.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Submitter.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Worker.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/GenericDAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/LocationDAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/MethodPercentageDAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/RunResultDAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/VendorDAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/GenericEJB3DAO.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/LocationDAOBean.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/MethodPercentageDAOBean.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/RunResultDAOBean.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/VendorDAOBean.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Location.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/MethodPercentage.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/RunResult.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Vendor.java
Log:
Added new classes to submit results to database.

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerConfig.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerConfig.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerConfig.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,52 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit;
+
+public class ContainerConfig
+{
+
+   private String beansXMLConfig ;
+   private String scanClasspath;
+   public String getBeansXMLConfig()
+   {
+      return beansXMLConfig;
+   }
+   public void setBeansXMLConfig(String beansXMLConfig)
+   {
+      this.beansXMLConfig = beansXMLConfig;
+   }
+   public String getScanClasspath()
+   {
+      return scanClasspath;
+   }
+   public void setScanClasspath(String scanClasspath)
+   {
+      this.scanClasspath = scanClasspath;
+   }
+   
+   public ContainerConfig(String beansConfig, String scan)
+   {
+      this.beansXMLConfig = beansConfig;
+      this.scanClasspath = scan;
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerManagement.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerManagement.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ContainerManagement.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,51 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit;
+
+import java.io.File;
+
+import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
+
+public class ContainerManagement
+{
+   private ContainerConfig config;
+   public ContainerManagement( ContainerConfig conf)
+   {
+      this.config = conf;
+   }
+   
+   public void startContainer()
+      throws  Exception
+   {
+      EJB3StandaloneBootstrap.boot(null);
+      EJB3StandaloneBootstrap.deployXmlResource(config.getBeansXMLConfig());
+      EJB3StandaloneBootstrap.scanClasspath(config.getScanClasspath().replace("/", File.separator));
+   }
+   
+   public void shutdown()
+   {
+      EJB3StandaloneBootstrap.shutdown();
+      System.exit(1);
+   }
+ 
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ORMInitialiseDB.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ORMInitialiseDB.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/ORMInitialiseDB.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,66 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit;
+
+import java.io.File;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
+
+public class ORMInitialiseDB
+{
+
+   public static void main(String[] args)
+   {
+      if (2 == args.length || StringUtils.isBlank(args[BEANS_XML_PATH]) || StringUtils.isBlank(args[SCAN_PATH]))
+      {
+         // Boot the JBoss Microcontainer with EJB3 settings, automatically
+         // loads ejb3-interceptors-aop.xml and embedded-jboss-beans.xml
+         EJB3StandaloneBootstrap.boot(null);
+      
+         // Deploy custom stateless beans (datasource, mostly)
+         EJB3StandaloneBootstrap.deployXmlResource(args[BEANS_XML_PATH]);
+      
+         // Deploy all EJBs found on classpath (slow, scans all)
+         //EJB3StandaloneBootstrap.scanClasspath();
+         
+         // Deploy all EJBs found on classpath (fast, scans only build directory)
+         // This is a relative location, matching the substring end of one of java.class.path locations!
+         // Print out System.getProperty("java.class.path") to understand this...
+         EJB3StandaloneBootstrap.scanClasspath(args[SCAN_PATH].replace("/", File.separator));
+
+         EJB3StandaloneBootstrap.shutdown();
+         
+         System.exit(1);
+      }
+      else
+      {
+         logger.error(String.format("Wrong number of args [$1%n]", args.length));
+      }
+   }
+   
+   private static Logger logger = Logger.getLogger(ORMInitialiseDB.class );
+   private static final int BEANS_XML_PATH = 0;
+   private static final int SCAN_PATH = 1;
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Submitter.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Submitter.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Submitter.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,259 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit;
+
+import java.sql.Date;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.Query;
+import javax.transaction.UserTransaction;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.math.NumberUtils;
+import org.apache.log4j.Logger;
+import org.jboss.jbossts.performance.results.submit.model.Location;
+import org.jboss.jbossts.performance.results.submit.model.MethodPercentage;
+import org.jboss.jbossts.performance.results.submit.model.RunResult;
+import org.jboss.jbossts.performance.results.submit.model.Vendor;
+
+import com.arjuna.ats.arjuna.coordinator.TxControl;
+
+public class Submitter extends Worker
+{
+   void process (String[] args, Map<String, String> timings)
+   {
+      boolean doCommit = false;
+      try
+      {
+         getUserTransaction().begin();
+         EntityManager entityManager = getEMFactory().createEntityManager();
+         RunResult result = new RunResult();
+         result.setEndTimestamp(new Date(new java.util.Date ().getTime()));
+         result.setTestType(args[TEST_TYPE]);
+         result.setTxType(args[TX_TYPE]);
+         result.setObjectStore(args[OBJECT_STORE]);
+         result.setThreadCount(Long.parseLong(args[THREAD_COUNT]));
+         result.setWarmupCount(Long.parseLong(args[WARMUP_COUNT]));
+         result.setProfiledCount(Long.parseLong(args[PROFILED_COUNT]));
+         result.setElapsedTimeNanos(Long.parseLong(timings.get(CONTRACT.ELAPSED_TIME_NANOS.toString())));
+         result.setPerTxNanos(Long.parseLong(timings.get(CONTRACT.PER_TX_NANOS.toString())));
+         result.setTxPerSecond(Long.parseLong(timings.get(CONTRACT.TX_PER_SECOND.toString())));
+         result.setElapsedTimeSeconds(Long.parseLong(timings.get(CONTRACT.ELAPSED_TIME_SECONDS.toString())));
+         result.setTxCount(Long.parseLong(timings.get(CONTRACT.TX_COUNT.toString())));
+         result.setResultLocation(args[RESULTS_LOCATION]);
+         Query q = entityManager.createNamedQuery("findByDescription").setParameter("desc", args[VENDOR_A_LOCATION]);
+         Location locationA = null;
+         try
+         {
+            locationA = (Location) q.getSingleResult();
+         }
+         catch (NoResultException nre)
+         {
+            locationA = new Location(args[VENDOR_A_LOCATION]);
+            entityManager.persist(locationA);
+            entityManager.flush();
+         }
+         q = entityManager.createNamedQuery("findByDescription").setParameter("desc", args[VENDOR_B_LOCATION]);
+         Location locationB = null;
+         try
+         {
+            locationB = (Location) q.getSingleResult();
+         }
+         catch (NoResultException nre)
+         {
+            locationB = new Location(args[VENDOR_B_LOCATION]);
+            entityManager.persist(locationB);
+            entityManager.flush();
+         }
+         q = entityManager.createNamedQuery("findByName").setParameter("name", args[VENDOR_A_NAME]);
+         Vendor vendorA = null;
+         try
+         {
+            vendorA = (Vendor) q.getSingleResult();
+         }
+         catch (NoResultException nre)
+         {
+            vendorA = new Vendor(args[VENDOR_A_NAME]);
+            entityManager.persist(vendorA);
+            entityManager.flush();
+         }
+         q = entityManager.createNamedQuery("findByName").setParameter("name", args[VENDOR_B_NAME]);
+         Vendor vendorB  = null;
+         try
+         {
+            vendorB = (Vendor) q.getSingleResult();
+         }
+         catch (NoResultException nre)
+         {
+            vendorB  = new Vendor(args[VENDOR_B_NAME]);
+            entityManager.persist(vendorB );
+            entityManager.flush();
+         }
+         
+         MethodPercentage percentages = new MethodPercentage();
+         percentages.setBegin(Float.parseFloat(args[METHOD_BEGIN]));
+         percentages.setFindA(Float.parseFloat(args[METHOD_FIND_A]));
+         percentages.setFindB(Float.parseFloat(args[ METHOD_FIND_B]));
+         percentages.setUpdateA(Float.parseFloat(args[METHOD_UPDATE_A]));
+         percentages.setUpdateB(Float.parseFloat(args[METHOD_UPDATE_B]));
+         percentages.setCommit(Float.parseFloat(args[METHOD_COMMIT]));
+         float total =  percentages.getBegin().floatValue() + percentages.getFindA().floatValue() + percentages.getFindB().floatValue() + percentages.getUpdateA().floatValue() + percentages.getUpdateB().floatValue() + percentages.getCommit().floatValue();
+         percentages.setMisc( new Float(100).floatValue() - total);   
+         
+         percentages = entityManager.merge(percentages);
+         result.setDbLocationA(locationA);
+         result.setDbLocationB(locationB);
+         result.setVendorA(vendorA);
+         result.setVendorB(vendorB);
+         result.setMethodPercentage(percentages);
+         entityManager.persist(result);
+         entityManager.flush();
+         doCommit = true;
+      }
+      catch (Exception e)
+      {
+         logger.error(e.getMessage(), e);
+      }
+      finally
+      {
+         
+      }
+      try
+      {
+         if (doCommit)
+         {
+            getUserTransaction().commit();
+         }
+         else
+         {
+            getUserTransaction().rollback();
+         }
+      }
+      catch (Exception e)
+      {
+         logger.error(e.getMessage(), e);
+      }
+      finally
+      {
+         try
+         {
+            if (null != context)
+            {
+               context.close();
+            }
+         }
+         catch (Exception e)
+         {
+            logger.error(e.getMessage() , e  );
+         }
+      }
+   }
+   
+   Map<String, String> getTimings(String[] args)
+   {
+      Map<String, String> returnValue = new HashMap<String, String>(7);
+      List<String> csv = Arrays.asList(StringUtils.split(args[PROFILE_CSV], ","));
+      returnValue.put(CONTRACT.ELAPSED_TIME_NANOS.toString() , csv.get(CSV_ELAPSED_TIME_NANO).trim());
+      returnValue.put(CONTRACT.PER_TX_NANOS.toString(), csv.get(CSV_PER_TX_NANOS).trim());
+      returnValue.put(CONTRACT.TX_PER_SECOND.toString(), csv.get(CSV_TX_PER_SECOND).trim());
+      returnValue.put(CONTRACT.ELAPSED_TIME_SECONDS.toString(), csv.get(CSV_ELAPSED_TIME_SECONDS).trim());
+      returnValue.put(CONTRACT.TX_COUNT.toString(), csv.get(CSV_TX_COUNT).trim());
+      return returnValue;
+   }
+   
+   public static void main(String[] args)
+   {
+      try
+      {
+         TxControl.setDefaultTimeout(NumberUtils.INTEGER_ZERO);
+         Submitter submit = new  Submitter();
+         ContainerConfig conf = new  ContainerConfig(args[BEANS_CONFIG], args[SCAN_CLASSPATH]);
+         ContainerManagement container = new ContainerManagement(conf);
+         container.startContainer();
+         submit.context = new InitialContext();
+         submit.process(args, submit.getTimings(args));
+         container.shutdown();
+      }
+      catch (Exception e )
+      {
+         logger.error(e.getMessage(), e);
+      }
+   }
+   
+   private static final int TEST_TYPE = 0;
+   private static final int TX_TYPE = TEST_TYPE + 1; // xa or local-tx
+   private static final int OBJECT_STORE = TX_TYPE + 1;
+   private static final int THREAD_COUNT = OBJECT_STORE + 1;
+   private static final int WARMUP_COUNT = THREAD_COUNT + 1;
+   private static final int PROFILED_COUNT = WARMUP_COUNT + 1;
+   private static final int PROFILE_CSV = PROFILED_COUNT + 1;
+   private static final int RESULTS_LOCATION = PROFILE_CSV + 1 ;
+   private static final int VENDOR_A_LOCATION = RESULTS_LOCATION + 1 ;
+   private static final int VENDOR_B_LOCATION = VENDOR_A_LOCATION + 1 ;
+   private static final int VENDOR_A_NAME = VENDOR_B_LOCATION + 1 ;
+   private static final int VENDOR_B_NAME = VENDOR_A_NAME + 1 ;
+   private static final int HOSTNAME = VENDOR_B_NAME + 1 ;
+   private static final int INET_ADDRESS = HOSTNAME + 1 ;
+   private static final int RUN_SEQUENCE = INET_ADDRESS + 1 ;
+   private static final int PROFILER = RUN_SEQUENCE + 1 ;
+   private static final int METHOD_BEGIN = PROFILER + 1;
+   private static final int METHOD_FIND_A = METHOD_BEGIN + 1;
+   private static final int METHOD_FIND_B = METHOD_FIND_A + 1 ;
+   private static final int METHOD_UPDATE_A = METHOD_FIND_B + 1 ;
+   private static final int METHOD_UPDATE_B = METHOD_UPDATE_A + 1 ;
+   private static final int METHOD_COMMIT = METHOD_UPDATE_B + 1 ;
+//   private static final int ELAPSED_TIME_NANOS = METHOD_COMMIT + 1 ;
+//   private static final int PER_TX_NANOS = ELAPSED_TIME_NANOS + 1 ;
+//   private static final int TX_PER_SECOND = PER_TX_NANOS + 1 ;
+//   private static final int ELAPSED_TIME_SECONDS = TX_PER_SECOND + 1 ;
+//   private static final int TX_COUNT = ELAPSED_TIME_SECONDS + 1 ;
+   private static final int BEANS_CONFIG = METHOD_COMMIT + 1 ;
+   private static final int SCAN_CLASSPATH = BEANS_CONFIG + 1 ;
+   
+   private static final int CSV_ELAPSED_TIME_NANO = 1;
+   private static final int CSV_PER_TX_NANOS  = CSV_ELAPSED_TIME_NANO + 1;
+   private static final int CSV_TX_PER_SECOND  = CSV_PER_TX_NANOS + 1;
+   private static final int CSV_ELAPSED_TIME_SECONDS  = CSV_TX_PER_SECOND + 1;
+   private static final int CSV_TX_COUNT  = CSV_ELAPSED_TIME_SECONDS + 1;
+   
+   private static Logger logger = Logger.getLogger(Submitter.class);
+   
+   protected String JNDI_NAME_USERTX = "UserTransaction";
+
+   enum CONTRACT
+   {
+      ELAPSED_TIME_NANOS ,PER_TX_NANOS ,TX_PER_SECOND ,ELAPSED_TIME_SECONDS ,TX_COUNT
+   }
+   
+   protected UserTransaction getUserTransaction() throws Exception
+   {
+      return (UserTransaction)context.lookup(JNDI_NAME_USERTX);
+   }
+   
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Worker.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Worker.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/Worker.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,47 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.persistence.EntityManagerFactory;
+
+public class Worker
+{
+   protected InitialContext context = null;
+   
+   @SuppressWarnings({"unchecked"})
+   protected <T> T lookupLocalBean(Class<T> beanInterface, String beanImpl) {
+       try {
+           return (T)context.lookup(beanImpl + "/local");
+       } catch (NamingException ex) {
+           throw new RuntimeException(ex);
+       }
+   }
+
+   protected EntityManagerFactory getEMFactory()
+      throws NamingException
+   {
+      return (EntityManagerFactory) context.lookup("java:/EntityManagerFactories/resultsEMF");
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/GenericDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/GenericDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/GenericDAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,33 @@
+package org.jboss.jbossts.performance.results.submit.dao;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * An interface shared by all business data access objects.
+ * <p>
+ * All CRUD (create, read, update, delete) basic data access operations are
+ * isolated in this interface and shared accross all DAO implementations.
+ * The current design is for a state-management oriented persistence layer
+ * (for example, there is no UDPATE statement function) that provides
+ * automatic transactional dirty checking of business objects in persistent
+ * state.
+ *
+ * @author Christian Bauer
+ */
+public interface GenericDAO<T, ID extends Serializable> {
+
+    T findById(ID id, boolean lock);
+
+    List<T> findAll();
+
+    List<T> findByExample(T exampleInstance, String... excludeProperty);
+
+    void makePersistent(T entity);
+    
+    T merge(T entity);
+
+    void makeTransient(T entity);
+
+    public void flush() ;
+}


Property changes on: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/GenericDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/LocationDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/LocationDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/LocationDAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,31 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao;
+
+import org.jboss.jbossts.performance.results.submit.model.Location;
+import auction.dao.GenericDAO;
+
+public interface LocationDAO extends GenericDAO<Location, Long>
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/MethodPercentageDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/MethodPercentageDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/MethodPercentageDAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,31 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao;
+
+import org.jboss.jbossts.performance.results.submit.model.MethodPercentage;
+import auction.dao.GenericDAO;
+
+public interface MethodPercentageDAO extends GenericDAO<MethodPercentage, Long>
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/RunResultDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/RunResultDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/RunResultDAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,30 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao;
+
+import org.jboss.jbossts.performance.results.submit.model.RunResult;
+
+public interface RunResultDAO extends GenericDAO<RunResult, Long>
+{
+ 
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/VendorDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/VendorDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/VendorDAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,31 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao;
+
+import org.jboss.jbossts.performance.results.submit.model.Vendor;
+import auction.dao.GenericDAO;
+
+public interface VendorDAO extends GenericDAO<Vendor, Long>
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/GenericEJB3DAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/GenericEJB3DAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/GenericEJB3DAO.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,127 @@
+package org.jboss.jbossts.performance.results.submit.dao.ejb3;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.jbossts.performance.results.submit.dao.GenericDAO;
+
+
+/**
+ * Implements the generic CRUD data access operations using Java Persistence APIs.
+ * <p>
+ * To write a DAO, subclass and parameterize this class with your entity.
+ * Of course, assuming that you have a traditional 1:1 appraoch for
+ * Entity:DAO design. This is actually an implementation that uses some
+ * extensions for Java Persistence from Hibernate - you can see how the
+ * packages for the extensions are not imported, but named inline.
+ *
+ * @author Christian Bauer
+ */
+public abstract class GenericEJB3DAO<T,ID extends Serializable>
+        implements GenericDAO<T, ID> {
+
+    final private Class<T> entityBeanType;
+
+    @PersistenceContext (name="results")
+    protected EntityManager em;
+
+    @SuppressWarnings("unchecked")
+   public GenericEJB3DAO() {
+        this.entityBeanType = (Class<T>) getClass().getSuperclass().getTypeParameters()[0].getBounds()[0];
+    }
+
+    // If this DAO is wired in as a Seam component, Seam injects the right persistence context
+    // if a method on this DAO is called. If the caller is a conversational stateful component,
+    // the persistence context will be scoped to the conversation, not to the method call.
+    // You can call this method and set the EntityManager manually, in an integration test.
+    /*
+    @PersistenceContext
+    public void setEntityManager(EntityManager em) {
+        this.em = em;
+    }
+   */
+    protected EntityManager getEntityManager() {
+        if (em == null)
+            throw new IllegalStateException("EntityManager has not been set on DAO before usage");
+        return em;
+    }
+
+    public Class<T> getEntityBeanType() {
+        return entityBeanType;
+    }
+
+    public T findById(ID id, boolean lock) {
+        final T entity;
+        if (lock) {
+            entity = getEntityManager().find(getEntityBeanType(), id);
+            em.lock(entity, javax.persistence.LockModeType.WRITE);
+        } else {
+            entity = getEntityManager().find(getEntityBeanType(), id);
+        }
+        return entity;
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<T> findAll() {
+        return getEntityManager().createQuery("from " + getEntityBeanType().getName() ).getResultList();
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public List<T> findByExample(T exampleInstance, String... excludeProperty) {
+        // Using Hibernate, more difficult with EntityManager and EJB-QL
+        org.hibernate.Criteria crit = ((org.hibernate.ejb.HibernateEntityManager)getEntityManager())
+                            .getSession()
+                            .createCriteria(getEntityBeanType());
+        org.hibernate.criterion.Example example =
+                org.hibernate.criterion.Example.create(exampleInstance);
+        for (String exclude : excludeProperty) {
+            example.excludeProperty(exclude);
+        }
+        crit.add(example);
+        return crit.list();
+    }
+
+    public T merge(T entity) {
+        return getEntityManager().merge(entity);
+    }
+    
+    public void makePersistent(T entity) 
+    {
+       getEntityManager().persist(entity); 
+    }
+   
+    public void makeTransient(T entity) {
+        getEntityManager().remove(entity);
+    }
+
+    public void flush() {
+        getEntityManager().flush();
+    }
+
+    public void clear() {
+        getEntityManager().clear();
+    }
+
+    /**
+     * Use this inside subclasses as a convenience method.
+     */
+    @SuppressWarnings("unchecked")
+    protected List<T> findByCriteria(org.hibernate.criterion.Criterion... criterion) {
+        // Using Hibernate, more difficult with EntityManager and EJB-QL
+        org.hibernate.Session session =
+                ((org.hibernate.ejb.HibernateEntityManager)getEntityManager()).getSession();
+        org.hibernate.Criteria crit
+                = session.createCriteria(getEntityBeanType());
+        for (org.hibernate.criterion.Criterion c : criterion) {
+            crit.add(c);
+        }
+        return crit.list();
+   }
+
+    
+}
+


Property changes on: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/GenericEJB3DAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/LocationDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/LocationDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/LocationDAOBean.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,39 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao.ejb3;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+import org.jboss.jbossts.performance.results.submit.dao.LocationDAO;
+import org.jboss.jbossts.performance.results.submit.model.Location;
+
+import auction.dao.ejb3.GenericEJB3DAO;
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+
+public class LocationDAOBean extends GenericEJB3DAO<Location, Long> implements LocationDAO
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/MethodPercentageDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/MethodPercentageDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/MethodPercentageDAOBean.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,39 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao.ejb3;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+import org.jboss.jbossts.performance.results.submit.dao.MethodPercentageDAO;
+import org.jboss.jbossts.performance.results.submit.model.MethodPercentage;
+
+import auction.dao.ejb3.GenericEJB3DAO;
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+
+public class MethodPercentageDAOBean extends GenericEJB3DAO<MethodPercentage, Long> implements MethodPercentageDAO
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/RunResultDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/RunResultDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/RunResultDAOBean.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,39 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao.ejb3;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+import org.jboss.jbossts.performance.results.submit.dao.RunResultDAO;
+import org.jboss.jbossts.performance.results.submit.model.RunResult;
+
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+
+public class RunResultDAOBean extends GenericEJB3DAO<RunResult, Long> implements RunResultDAO
+{
+
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/VendorDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/VendorDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/dao/ejb3/VendorDAOBean.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,40 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.dao.ejb3;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+import org.jboss.jbossts.performance.results.submit.dao.VendorDAO;
+import org.jboss.jbossts.performance.results.submit.model.Vendor;
+
+import auction.dao.ejb3.GenericEJB3DAO;
+
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+
+public class VendorDAOBean extends GenericEJB3DAO<Vendor, Long> implements VendorDAO
+{
+
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Location.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Location.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Location.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,117 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+import org.apache.commons.lang.builder.CompareToBuilder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+ at NamedQuery
+(
+   name="findByDescription",query="SELECT l FROM location l WHERE l.description = :desc"
+)
+
+ at Entity
+ at Table (name="location")
+public class Location implements Serializable, Comparable<Location>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   @Id
+   @GeneratedValue (strategy=GenerationType.AUTO)
+   @Column (name="location_id")
+   private Long id = null;
+   
+   @Column (name="description", unique=true)
+   private String description = null;
+
+   public Long getId()
+   {
+      return id;
+   }
+
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+
+   public String getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(String description)
+   {
+      this.description = description;
+   }
+
+   @Override
+   public int compareTo(Location otherThing)
+   {
+      return new CompareToBuilder().append(this.getDescription(), otherThing.getDescription()).toComparison();
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      boolean returnValue = false;
+      if (null != obj)
+      {
+         if (obj == this)
+         {
+            returnValue = true;
+         }
+         else
+         {
+            if (obj.getClass() == this.getClass())
+            {
+               Location otherThingy = (Location)obj;
+               returnValue = new EqualsBuilder().append(this.getDescription(), otherThingy.getDescription()).isEquals();
+            }
+         }
+      }
+      return returnValue;
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return new HashCodeBuilder(17, 37).append(getDescription()).toHashCode();
+   }
+
+   public Location(String desc)
+   {
+      setDescription(desc);
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/MethodPercentage.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/MethodPercentage.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/MethodPercentage.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,184 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.apache.commons.lang.builder.CompareToBuilder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+ at Entity
+ at Table (name= "method_percentage")
+public class MethodPercentage implements Serializable, Comparable<MethodPercentage>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   @Id
+   @GeneratedValue (strategy=GenerationType.AUTO)
+   @Column (name="method_percentage_id")
+   private Long id = null;
+   
+   @Column (name="method_begin")
+   private Float begin = null;
+   
+   @Column (name="method_find_a")
+   private Float findA = null;
+   
+   @Column (name="method_find_b")
+   private Float findB = null;
+   
+   @Column (name="method_update_a")
+   private Float updateA = null;
+
+   @Column (name="method_update_b")
+   private Float updateB = null;
+
+   @Column (name="method_commit")
+   private Float commit = null;
+
+   @Column (name="method_misc")
+   private Float misc = null;
+
+   public Long getId()
+   {
+      return id;
+   }
+
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+
+   public Float getBegin()
+   {
+      return begin;
+   }
+
+   public void setBegin(Float begin)
+   {
+      this.begin = begin;
+   }
+
+   public Float getFindA()
+   {
+      return findA;
+   }
+
+   public void setFindA(Float findA)
+   {
+      this.findA = findA;
+   }
+
+   public Float getFindB()
+   {
+      return findB;
+   }
+
+   public void setFindB(Float findB)
+   {
+      this.findB = findB;
+   }
+
+   public Float getUpdateA()
+   {
+      return updateA;
+   }
+
+   public void setUpdateA(Float updateA)
+   {
+      this.updateA = updateA;
+   }
+
+   public Float getUpdateB()
+   {
+      return updateB;
+   }
+
+   public void setUpdateB(Float updateB)
+   {
+      this.updateB = updateB;
+   }
+
+   public Float getCommit()
+   {
+      return commit;
+   }
+
+   public void setCommit(Float commit)
+   {
+      this.commit = commit;
+   }
+
+   public Float getMisc()
+   {
+      return misc;
+   }
+
+   public void setMisc(Float misc)
+   {
+      this.misc = misc;
+   }
+
+   @Override
+   public int compareTo(MethodPercentage otherThing)
+   {
+      return new CompareToBuilder().append(this.getBegin(), otherThing.getBegin()).append(this.getFindA(), otherThing.getFindA()).append(this.getFindB(), otherThing.getFindB()).append(this.getUpdateA(), otherThing.getUpdateA()).append(this.getUpdateB(), otherThing.getUpdateB()).append(this.getUpdateB(), otherThing.getUpdateB()).append(this.getCommit(), otherThing.getCommit()).toComparison();
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      boolean returnValue = false;
+      if (null != obj)
+      {
+         if (obj == this)
+         {
+            returnValue = true;
+         }
+         else
+         {
+            if (obj.getClass() == this.getClass())
+            {
+               MethodPercentage otherThing = (MethodPercentage)obj;
+               returnValue = new EqualsBuilder().append(this.getBegin(), otherThing.getBegin()).append(this.getFindA(), otherThing.getFindA()).append(this.getFindB(), otherThing.getFindB()).append(this.getUpdateA(), otherThing.getUpdateA()).append(this.getUpdateB(), otherThing.getUpdateB()).append(this.getCommit(), otherThing.getCommit()).append(this.getMisc(), otherThing.getMisc()).isEquals();
+            }
+         }
+      }
+      return returnValue;
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return new HashCodeBuilder(17, 37).append(getBegin()).append(getFindA()).append(getFindB()).append(getUpdateA()).append(getUpdateB()).append(getCommit()).append(getMisc()).toHashCode();
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/RunResult.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/RunResult.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/RunResult.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,403 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.model;
+
+import java.io.Serializable;
+import java.sql.Date;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+ at Entity
+ at Table(name="run_result")
+public class RunResult implements Serializable , Comparable<RunResult>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   @Id
+   @GeneratedValue (strategy=GenerationType.AUTO)
+   @Column(name ="run_result_id")
+   private Long id = null;
+
+   @Column (name ="end_timestamp")
+   private Date endTimestamp = null;
+   
+   @Column (name =  "test_type", length=8) 
+   private String testType= null;
+   
+   /*@Column (name = "profiling_status")
+   private Boolean profilingStatus = null;*/
+   
+   @Column (name = "tx_type", length=20)
+   private String txType = null;
+   
+   @Column (name= "object_store", length=100)
+   private String objectStore = null;
+   
+   @Column (name = "thread_count")  
+   private Long threadCount = null;
+   
+   @Column (name= "warmup_count")
+   private Long warmupCount = null;
+
+   @Column (name= "profiled_count")
+   private Long profiledCount = null;
+   
+   @Column (name="elapsed_time_nanos")
+   private Long elapsedTimeNanos = null;
+   
+   @Column (name="per_tx_nanos")
+   private Long perTxNanos = null;
+   
+   @Column (name="tx_per_second")
+   private Long txPerSecond = null;
+   
+   @Column (name="elapsed_time_seconds")
+   private Long elapsedTimeSeconds = null;
+   
+   @Column (name="tx_count")
+   private Long txCount = null;
+   
+   @Column (name="results_location")
+   private String resultLocation = null;
+   
+   @ManyToOne(cascade= {CascadeType.PERSIST, CascadeType.MERGE})
+   @JoinColumn (name="location_a_id", nullable=false, updatable=false)
+   private Location dbLocationA = null;
+   
+   @ManyToOne(cascade= {CascadeType.PERSIST, CascadeType.MERGE})
+   @JoinColumn (name="location_b_id", nullable=false, updatable=false)
+   private Location dbLocationB = null;
+   
+   @ManyToOne(cascade= {CascadeType.PERSIST, CascadeType.MERGE})
+   @JoinColumn (name="vendor_a_id", nullable=false, updatable=false)
+   private Vendor vendorA = null;
+   
+   @ManyToOne(cascade= {CascadeType.PERSIST, CascadeType.MERGE})
+   @JoinColumn (name="vendor_b_id", nullable=false, updatable=false)
+   private Vendor vendorB = null;
+   
+   @Column (name="hostname")
+   private String hostname = null;
+   
+   @Column (name="inet_address")
+   private String inetAddress = null;
+   
+   @Column (name="run_seq")
+   private Long runSequence = null;
+   
+   @Column (name="profiler_name")
+   private String profilerName = null;
+   
+   @OneToOne(cascade= {CascadeType.ALL} )
+   @JoinColumn(name="method_percentage_id", nullable=false, updatable=false)
+   private MethodPercentage methodPercentage = null;
+
+   public Long getId()
+   {
+      return id;
+   }
+
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+
+   public Date getEndTimestamp()
+   {
+      return endTimestamp;
+   }
+
+   public void setEndTimestamp(Date endTimestamp)
+   {
+      this.endTimestamp = endTimestamp;
+   }
+
+   public String getTestType()
+   {
+      return testType;
+   }
+
+   public void setTestType(String testType)
+   {
+      this.testType = testType;
+   }
+
+//   public Boolean getProfilingStatus()
+//   {
+//      return profilingStatus;
+//   }
+//
+//   public void setProfilingStatus(Boolean profilingStatus)
+//   {
+//      this.profilingStatus = profilingStatus;
+//   }
+
+   public String getTxType()
+   {
+      return txType;
+   }
+
+   public void setTxType(String txType)
+   {
+      this.txType = txType;
+   }
+
+   public String getObjectStore()
+   {
+      return objectStore;
+   }
+
+   public void setObjectStore(String objectStore)
+   {
+      this.objectStore = objectStore;
+   }
+
+   
+   public Long getElapsedTimeNanos()
+   {
+      return elapsedTimeNanos;
+   }
+
+   public void setElapsedTimeNanos(Long elapsedTimeNanos)
+   {
+      this.elapsedTimeNanos = elapsedTimeNanos;
+   }
+
+   public Long getPerTxNanos()
+   {
+      return perTxNanos;
+   }
+
+   public void setPerTxNanos(Long perTxNanos)
+   {
+      this.perTxNanos = perTxNanos;
+   }
+
+   public Long getTxPerSecond()
+   {
+      return txPerSecond;
+   }
+
+   public void setTxPerSecond(Long txPerSecond)
+   {
+      this.txPerSecond = txPerSecond;
+   }
+
+   public Long getElapsedTimeSeconds()
+   {
+      return elapsedTimeSeconds;
+   }
+
+   public void setElapsedTimeSeconds(Long elapsedTimeSeconds)
+   {
+      this.elapsedTimeSeconds = elapsedTimeSeconds;
+   }
+
+   public Long getTxCount()
+   {
+      return txCount;
+   }
+
+   public void setTxCount(Long txCount)
+   {
+      this.txCount = txCount;
+   }
+
+   public String getResultLocation()
+   {
+      return resultLocation;
+   }
+
+   public void setResultLocation(String resultLocation)
+   {
+      this.resultLocation = resultLocation;
+   }
+
+   public Location getDbLocationA()
+   {
+      return dbLocationA;
+   }
+
+   public void setDbLocationA(Location dbLocationA)
+   {
+      this.dbLocationA = dbLocationA;
+   }
+
+   public Location getDbLocationB()
+   {
+      return dbLocationB;
+   }
+
+   public void setDbLocationB(Location dbLocationB)
+   {
+      this.dbLocationB = dbLocationB;
+   }
+
+
+   public String getHostname()
+   {
+      return hostname;
+   }
+
+   public void setHostname(String hostname)
+   {
+      this.hostname = hostname;
+   }
+
+   public String getInetAddress()
+   {
+      return inetAddress;
+   }
+
+   public void setInetAddress(String inetAddress)
+   {
+      this.inetAddress = inetAddress;
+   }
+
+   public Long getRunSequence()
+   {
+      return runSequence;
+   }
+
+   public void setRunSequence(Long runSequence)
+   {
+      this.runSequence = runSequence;
+   }
+
+   public String getProfilerName()
+   {
+      return profilerName;
+   }
+
+   public void setProfilerName(String profilerName)
+   {
+      this.profilerName = profilerName;
+   }
+
+   public MethodPercentage getMethodPercentage()
+   {
+      return methodPercentage;
+   }
+
+   public void setMethodPercentage(MethodPercentage methodPercentage)
+   {
+      this.methodPercentage = methodPercentage;
+   }
+
+   public Vendor getVendorA()
+   {
+      return vendorA;
+   }
+
+   public void setVendorA(Vendor vendorA)
+   {
+      this.vendorA = vendorA;
+   }
+
+   public Vendor getVendorB()
+   {
+      return vendorB;
+   }
+
+   public void setVendorB(Vendor vendorB)
+   {
+      this.vendorB = vendorB;
+   }
+
+   public Long getWarmupCount()
+   {
+      return warmupCount;
+   }
+
+   public void setWarmupCount(Long warmupCount)
+   {
+      this.warmupCount = warmupCount;
+   }
+
+   public Long getProfiledCount()
+   {
+      return profiledCount;
+   }
+
+   public void setProfiledCount(Long profiledCount)
+   {
+      this.profiledCount = profiledCount;
+   }
+
+   public Long getThreadCount()
+   {
+      return threadCount;
+   }
+
+   public void setThreadCount(Long threadCount)
+   {
+      this.threadCount = threadCount;
+   }
+   
+   @Override
+   public int compareTo(RunResult otherThing)
+   {
+      return Long.valueOf(this.getRunSequence()).compareTo(otherThing.getRunSequence());
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      boolean returnValue = false;
+      if (null != obj)
+      {
+         if (obj == this)
+         {
+            returnValue = true;
+         }
+         else
+         {
+            if (obj.getClass() == this.getClass())
+            {
+               RunResult otherThingy = (RunResult)obj;
+               returnValue = new EqualsBuilder().append(this.getRunSequence(), otherThingy.getRunSequence() ).isEquals();
+            }
+         }
+      }
+      return returnValue;
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return new HashCodeBuilder(17, 37).append(getRunSequence()).toHashCode();
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Vendor.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Vendor.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/org/jboss/jbossts/performance/results/submit/model/Vendor.java	2010-12-09 18:59:57 UTC (rev 36319)
@@ -0,0 +1,114 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.results.submit.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+ at NamedQuery
+(
+      name="findByName", query="SELECT v FROM vendor v WHERE v.name = :name")
+ at Entity
+ at Table (name="database_vendor")
+public class Vendor implements Serializable, Comparable<Vendor>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   @Id
+   @GeneratedValue (strategy=GenerationType.AUTO)
+   @Column (name="vendor_id")
+   private Long id = null;
+   
+   @Column (name="name", unique=true)
+   private String name = null;
+
+   public Long getId()
+   {
+      return id;
+   }
+
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @Override
+   public int compareTo(Vendor otherThing)
+   {
+      return Long.valueOf(this.getId()).compareTo(otherThing.getId());
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      boolean returnValue = false;
+      if (null != obj)
+      {
+         if (obj == this)
+         {
+            returnValue = true;
+         }
+         else
+         {
+            if (obj.getClass() == this.getClass())
+            {
+               Vendor otherThingy = (Vendor)obj;
+               returnValue = new EqualsBuilder().append(this.getName(), otherThingy.getName() ).isEquals();
+            }
+         }
+      }
+      return returnValue;
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return new HashCodeBuilder(17, 37).append(getName()).toHashCode();
+   }
+
+   public Vendor(String n)
+   {
+      setName(n);
+   }
+}



More information about the jboss-svn-commits mailing list