Hey,
Ingo, you load bean VerstorbenerBean (D) and EhegatteBean (C) from a jar
(with one CL, say CL1), and PersonBean (B) and AdresseBean (A) from another
one (with CL2); in C.ejbActivate you do fBPK on bean B, and you pass as
argument a PersonPK object, is this true ?
If so, then you load PersonPK with CL1, and the EntityContext references
CL1#PersonPK.
But then B.ejbActivate is called, and there you cast to PersonPK (which is
here loaded with CL2):
CL2#PersonPK pk = (CL2#PersonPK)ectx.getPrimaryKey(). Unfortunately
ectx.getPrimaryKey() returns CL1#PersonPK.
If not so, can you post bean C code ? (ejbActivate and ejbRemove at least)
Rickard, I'm not 100% sure of this, WDYT ? Am I missing something ?
IMHO the cache can't do anything in this situation. How should I be supposed
to fix this problem ?
Ingo, I haven't thought about so much, but the only solution I found is the
one you found, a third jar under lib/ext. Rickard ?
Merry Christmas and happy new year to everybody !
Simon
> -----Original Message-----
> From: Rickard �berg [mailto:[EMAIL PROTECTED]]
> Sent: gioved� 21 dicembre 2000 13:26
> To: jBoss Developer
> Subject: Re: [jBoss-Dev] ClassLoader or Cache Problem
>
>
> Hi!
>
> Ingo Bruell wrote:
> > 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
>
> Ok, so the problem seem to be that the wrong classloader is used when
> the referenced entity is activated. This should probably be
> fixed in the
> cache somehow.
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
>