User: starksm Date: 02/02/12 01:38:00 Modified: src/main/org/jboss/test/perf/interfaces EntityHome.java EntityPK.java Log: Fix some problems with the key ranges and add an assertion in the Session.remove(int low, int high) method that the remove count is as expected. Revision Changes Path 1.2 +2 -3 jbosstest/src/main/org/jboss/test/perf/interfaces/EntityHome.java Index: EntityHome.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/perf/interfaces/EntityHome.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EntityHome.java 25 Aug 2000 13:43:44 -0000 1.1 +++ EntityHome.java 12 Feb 2002 09:38:00 -0000 1.2 @@ -1,8 +1,8 @@ package org.jboss.test.perf.interfaces; // EntityHome.java -public interface EntityHome extends javax.ejb.EJBHome { - +public interface EntityHome extends javax.ejb.EJBHome +{ Entity create(int key, int value) throws java.rmi.RemoteException, javax.ejb.CreateException; @@ -11,5 +11,4 @@ java.util.Enumeration findInRange(int min, int max) throws java.rmi.RemoteException, javax.ejb.FinderException; - } 1.3 +47 -26 jbosstest/src/main/org/jboss/test/perf/interfaces/EntityPK.java Index: EntityPK.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/perf/interfaces/EntityPK.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- EntityPK.java 26 Jun 2001 18:28:35 -0000 1.2 +++ EntityPK.java 12 Feb 2002 09:38:00 -0000 1.3 @@ -1,32 +1,53 @@ package org.jboss.test.perf.interfaces; // EntityPK.java +import java.net.URL; +import java.security.ProtectionDomain; + public class EntityPK implements java.io.Serializable { - public int the_key; - - public EntityPK() - { - } - - public EntityPK(int the_key) - { - this.the_key = the_key; - } - - public boolean equals(Object obj) - { - EntityPK key = (EntityPK) obj; - return the_key == key.the_key; - } - public int hashCode() - { - return the_key; - } - - public String toString() - { - return "EntityPK[" + the_key + "]"; - } - + public int the_key; + + public EntityPK() + { + } + + public EntityPK(int the_key) + { + this.the_key = the_key; + } + + public boolean equals(Object obj) + { + boolean equals = false; + try + { + EntityPK key = (EntityPK) obj; + equals = the_key == key.the_key; + } + catch(ClassCastException e) + { + e.printStackTrace(); + // Find the codebase of obj + ProtectionDomain pd0 = getClass().getProtectionDomain(); + URL loc0 = pd0.getCodeSource().getLocation(); + ProtectionDomain pd1 = obj.getClass().getProtectionDomain(); + URL loc1 = pd1.getCodeSource().getLocation(); + System.out.println("PK0 location="+loc0); + System.out.println("PK0 loader="+getClass().getClassLoader()); + System.out.println("PK1 location="+loc1); + System.out.println("PK1 loader="+obj.getClass().getClassLoader()); + } + return equals; + } + public int hashCode() + { + return the_key; + } + + public String toString() + { + return "EntityPK[" + the_key + "]"; + } + }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development