Hi Simone,
Saturday, December 23, 2000, 2:04:26 PM, you wrote:
BS> PersonPK key = new PersonPK(); // Loaded with CL1
BS> ...
BS> person = personHome.findByPrimaryKey(key);
BS> So you *do* pass a PersonPK object as argument to fBPK. But this class is
BS> loaded with CL1.
OK. I missunderstood you...
BS> Now inside PersonBean, if you call EntityContext.getPrimaryKey() you get
BS> CL1#PersonPK, while if you do new PersonPK you get a CL2#PersonPK, hence the
BS> ClassCastException.
Yes, the printouts:
---- snip ----
PersonPK.class.getClassLoader():
java.net.URLClassLoader@5a2cef
ectx.getPrimaryKey().getClass().getClassLoader():
java.net.URLClassLoader@50af9b
Thread.currentThread().getContextClassLoader():
java.net.URLClassLoader@5ccedd
getParent()
===========
PersonPK.class.getClassLoader().getParent():
javax.management.loading.MLet@772617
ectx.getPrimaryKey().getClass().getClassLoader().getParent():
javax.management.loading.MLet@772617
Thread.currentThread().getContextClassLoader().getParent():
java.net.URLClassLoader@5a2cef
---- snap ----
says the same...
And now ?
so long
Ingo Bruell
---
<[EMAIL PROTECTED]>
<ICQ# 40377720>
Oldenburg PGP-Fingerprint: CB01 AE12 B359 87C4 BF1C 953C 8FE7 C648 169E E5FC
Germany PGP-Public-Key available at pgpkeys.mit.edu
Germany PGP-Public-Key available at pgpkeys.mit.edu