This content has been marked as final.
Show 2 replies
-
1. Re: ObjectMessage - Class definition
dim Dec 19, 2001 7:15 PM (in response to dim)further to this, I've added the following code:
// classes System.out.println("DataObject.class: " + DataObject.class); System.out.println("Object.class : " + o.getClass()); // class hashcodes System.out.println("DataObject hashcode: " + DataObject.class.hashCode()); System.out.println("Object hashcode : " + o.getClass().hashCode()); // classloaders System.out.println("DataObject classloader: " + DataObject.class.getClassLoader()); System.out.println("Object classloader : " + o.getClass().getClassLoader()); // classloader hashcodes System.out.println("DataObject classloader hashcode: " + DataObject.class.getClassLoader().hashCode()); System.out.println("Object classloader hashcode : " + o.getClass().getClassLoader().hashCode()); System.out.println("class.equals(class)=" + DataObject.class.equals(o.getClass()));
and get the following output:[exec] DataObject.class: interface org.openadaptor.dataobjects.DataObject [exec] Object.class : class [Lorg.openadaptor.dataobjects.DataObject; [exec] DataObject hashcode: 1068196008 [exec] Object hashcode : 883548328 [exec] DataObject classloader: javax.management.loading.MLet@4b57a0ad [exec] Object classloader : javax.management.loading.MLet@4b57a0ad [exec] DataObject classloader hashcode: 1264033965 [exec] Object classloader hashcode : 1264033965 [exec] class.equals(class)=false
now I dont know if maybe I'm completely misunderstanding things, but to me, it looks like the classloader is loading two instances of the class - one an interface, and one an actual class. I thought this wasn't possible... anyone have any ideas?
tia
dim -
2. Re: ObjectMessage - Class definition
dim Jan 8, 2002 1:25 AM (in response to dim)Just in case anyone comes back to this... the answer is of course obvious. One is DataObject[] and one is DataObject.
It was one of those late light, end of year things :)
cheers
dim