Phillip:

I am not sure if this is the answer for your situation,
and I am not sure how your code reads, but
depending on the way you have written your code,
when Bean1 creates Bean2,
you may have aliased Bean2 to Bean1, meaning
your reference to the object Bean2 at some time was to Bean1, and that 
reference
is now pointing to Bean2.  Two object names, one reference.
such as,

Bean1 b1 = new Bean1();
Bean2 b2 = new Bean1();
b1 = b2;
{some more code}
b1.destroy();  <==== reference to b2 lost as well.

If you destroy Bean1, then, you lose the reference to Bean2.

Hope this may help...

Carol Haney

At 10:04 AM 10/30/2000 -0600, you wrote:
>I have 2 stateful session beans:
>1)Bean1
>2)Bean2
>
>Bean1 creates Bean2.  Bean1 holds reference to Bean2.
>
>When Bean1 expires due to session timeout, the container(Jrun!) will call
>Bean1 remove.  In Bean1 remove method (which I override) , I call the remove
>in Bean2.  But I get the error "java.rmi.NoSuchObjectException: Object
>expired" when I try to remove Bean2.
>
>Does that mean that the container has already removed Bean2?  Do I still
>have to call Bean2 remove method?
>
>Thanks.
>
>
>Phillip Rhodes
>[EMAIL PROTECTED]
>Alcoa eCommerce
>https://www.ALCOADIRECT.COM
>826B Two Allegheny Center Pittsburgh, PA  15212
>(412) 553-4900  (phone)  (412) 553-2484 (fax)
>
>------------------------------------------------------------------------------
>Archives: http://www.egroups.com/group/jrun-interest/
>Unsubscribe: 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
>or send a message to [EMAIL PROTECTED] with 
>'unsubscribe' in the body.
>

------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to