Yes ! We had similar problems and setting reference to null fix it.
Andre Vermeulen
-----Original Message-----
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 9:06 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [JBoss-user] Re: Out of sync EJBs after passivation
Norton,
Our problem from the previous thread that you refer to was that in our
ejbPassivate code we did not set our dataholder to null.
Ok - I think this is what your problem is:
If you are holding references to other ejbs, the you should set them to null
in ejbPassivate and re-obtain them in ejbActivate. This is because the
object instance that you get when the bean is re-activated may not be the
same instance that the bean was loaded into.
again - I say I think... if I'm wrong I hope someone will correct me and I'm
not misleading too many ppl.
cheers
dim
> From: Norton Lam <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> Date: Thu, 14 Jun 2001 23:11:49 -0500
> Subject: [JBoss-user] Out of sync EJBs after passivation
> Reply-To: [EMAIL PROTECTED]
>
> Hey, all,
>
> I'm having a problem that looks to be a variation of a
> problem posted here earlier. However, I never saw
> if it was classified a bug and is being fixed, or if
> there is a workaround.
>
> I have an EJB A. It contains one to many EJBs B.
> When I retrieve several A EJBs via a column other
> than the primary key, they load and get the
> B EJBs associated with them. Everything works fine.
>
> After a few minutes, everything passivates and I try
> to retrieve the same set of A EJBs. But the B EJBs
> have now scrambled and are associated with the
> wrong A EJBs.
>
> (Side note: I've heard that EJBs containing other
> EJBs is not recommended, even by Sun, but
> I also need to get B EJBs directly in other parts
> of the application.)
>
> It appears this is probably the same issue under
> the subject of "Serious Bug? EntityBean out of
> synch with database". However, I am not using
> EJBDoclet and I am using BMP.
>
> The interesting thing is, I put some logging in
> ejbActivate() and ejbPassivate(). No other
> code is in those methods. When they
> EJBs are passivated and activated, they
> look fine. It is when my application tries
> to access the data when the trouble
> arises.
>
> I tried re-retrieving the B EJBs in ejbActivate(),
> but that also didn't help.
>
> Is this a bug? Is there a workaround?
>
> Thanx.
>
> Norton
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
**********************************************************************
The information in this e-mail is confidential and is legally privileged.
It is intended solely for the addressee. If this email is not intended for
you, you cannot copy, distribute, or disclose the included information
to any-one
If you are not the intended recipient please delete the mail. Whilst
all reasonable steps have been taken to ensure the accuracy and
integrity of all data transmitted electronically, no liability is accepted
if the data, for whatever reason, is corrupt or does not reach it's
intended destination.
All business is undertaken, subject to our standard trading conditions
which are available on request.
*******************************************************************
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user