You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Dakota Jack <da...@gmail.com> on 2004/12/01 23:48:59 UTC

WeakReference

Working here on a "new" paradigm, sort of, I think.

Apparently you can track what has happened to a strong reference with
a weak reference but you cannot manipulate the object referred to by
the strong reference by manipulating the weak reference.  Is that
right?  Seems odd to me.

Jack


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Martin Cooper <mf...@gmail.com>.
There are almost 800 people subscribed to this list. The first use of
the word "Struts" in this thread (now over a dozen messages) was in my
message, asking you to move the thread. I don't believe that's what
all those people expect to be reading about here.

If you want to develop your HaD ideas, then great! But have the Struts
part of the discussion here, and please ask your Java language
questions elsewhere. By your logic, this list would be open to any and
all Java language questions, and I for one am very strongly against
allowing that to happen.

--
Martin Cooper


On Thu, 2 Dec 2004 12:44:43 -0800, Dakota Jack <da...@gmail.com> wrote:
> Thanks for your input, Martin, however .................................
> 
> I am doing this in an attempt to flush out HaD, Martin.  HaD is a
> potential Struts 2.0 implementation, which seems to be an eminently
> appropriate topic for a Struts developer list.
> 
> 
> 
> Jack
> 
> On Thu, 2 Dec 2004 12:40:30 -0800, Martin Cooper <mf...@gmail.com> wrote:
> > Please move this thread to a Java language mailing list. This
> > discussion is not related to Struts. Thanks.
> >
> > --
> > Martin Cooper
> >
> >
> >
> >
> > On Thu, 2 Dec 2004 12:30:03 -0800, Dakota Jack <da...@gmail.com> wrote:
> > > Craig,
> > >
> > > I am thinking of doing a wrapper, e.g. PointComposite, which will then
> > > not have to be updated, because it will only adapt the signatures of
> > > the interface Point (not implement Point) but that the actual object
> > > doing the work will be a PointImpl which will soley be a weak
> > > reference and available only and updated internally as a Point object
> > > through the PointHotFactory static methods.  This would mean that
> > > there would be no strong reference to a Point class external to the
> > > PointComposite objects.  Does this make sense to you?  The class of
> > > the internal Point object, i.e. inside the PointComposite would be
> > > updated via a callback with a weak referenced listener.  This may all
> > > be way too complex.  If so, then I can abandon it, but I think it
> > > deserves a look.  I think maybe it could be made simple.
> > >
> > >
> > >
> > > Jack
> > >
> > > On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
> > > > Thanks, Craig,
> > > >
> > > > I am going to have to look into this more, then.  Interesting stuff in
> > > > any event.
> > > >
> > > > Jack
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> > > > > On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> > > > >
> > > > > > Essentially, I am trying to keep a WeakReference to
> > > > > > Point classes so that when I update the Point.class I can change the
> > > > > > classes for all the PointImpl objects out there.
> > > > >
> > > > > My understanding of Java (extensive in many areas, but not necessarily
> > > > > comprehensive here) is that this kind of replacement is *not* possible
> > > > > at all.  At best, you can create new instances of the new class and
> > > > > then transfer the state information -- but that still doesn't clean up
> > > > > references that other objects will have to the old instance.
> > > > >
> > > > > > Jack
> > > > >
> > > > > Craig
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > >
> > > >
> > > > "You can't wake a person who is pretending to be asleep."
> > > >
> > > > ~Native Proverb~
> > > >
> > > > "Each man is good in His sight. It is not necessary for eagles to be crows."
> > > >
> > > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> > > >
> > >
> > > --
> > >
> > > "You can't wake a person who is pretending to be asleep."
> > >
> > > ~Native Proverb~
> > >
> > > "Each man is good in His sight. It is not necessary for eagles to be crows."
> > >
> > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> > >
> > > ---------------------------------------------------------------------
> >
> >
> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: dev-help@struts.apache.org
> > >
> > >
> >
> 
> 
> --
> 
> 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Craig McClanahan <cr...@gmail.com>.
On Thu, 2 Dec 2004 13:08:34 -0800, Dakota Jack <da...@gmail.com> wrote:
> Well, Paul, your own last response was about the framework and about
> Java.  I sure am getting quizzical about these interjections.
> 

Martin is right ... this thread has gone outside the bounds of
off-topicness for Struts lists.  I apologize for my contribution to
the noise level.

> I cannot raise these questions simply in relation to WeakReference,
> etc.  They are an ongoing issue about one look at the Struts framework
> which I have called HaD. 

The problem is that this is just *your* viewpoint, and its not even
fleshed out enough yet to be a proposal that any of the committers
(including me) have expressed interest in as a potential Struts
architecture; it has strayed into being a Java Virtual Machine 101
discussion.

> If that is not tangentially okay on this
> list, then I think some people are just wound way too tight and I am
> in total disagreement with this approach.  Some common sense would be
> advised, in my opinion.
> 

Some respect for the feelings of the company you are trying to keep
would be advised, in my opinion :-).

Craig (last message on this thread)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Well, Paul, your own last response was about the framework and about
Java.  I sure am getting quizzical about these interjections.

I cannot raise these questions simply in relation to WeakReference,
etc.  They are an ongoing issue about one look at the Struts framework
which I have called HaD.  If that is not tangentially okay on this
list, then I think some people are just wound way too tight and I am
in total disagreement with this approach.  Some common sense would be
advised, in my opinion.

Jack


On Thu, 02 Dec 2004 15:57:37 -0500, Paul Speed <ps...@progeeks.com> wrote:
> I agree with Martin which is why I originally prefixed the subject with
> [OT] on my first response.
> 
> In the end, fleshed out, your stuff may be of interest.  But in the mean
> time, there are probably more appropriate places for you to learn about
> these parts of Java on your journey to realizing your ideas.
> 
> -Paul
> 
> 
> 
> Dakota Jack wrote:
> 
> > Thanks for your input, Martin, however .................................
> >
> > I am doing this in an attempt to flush out HaD, Martin.  HaD is a
> > potential Struts 2.0 implementation, which seems to be an eminently
> > appropriate topic for a Struts developer list.
> >
> > Jack
> >
> >
> > On Thu, 2 Dec 2004 12:40:30 -0800, Martin Cooper <mf...@gmail.com> wrote:
> >
> >>Please move this thread to a Java language mailing list. This
> >>discussion is not related to Struts. Thanks.
> >>
> >>--
> >>Martin Cooper
> >>
> >>
> >>
> >>
> >>On Thu, 2 Dec 2004 12:30:03 -0800, Dakota Jack <da...@gmail.com> wrote:
> >>
> >>>Craig,
> >>>
> >>>I am thinking of doing a wrapper, e.g. PointComposite, which will then
> >>>not have to be updated, because it will only adapt the signatures of
> >>>the interface Point (not implement Point) but that the actual object
> >>>doing the work will be a PointImpl which will soley be a weak
> >>>reference and available only and updated internally as a Point object
> >>>through the PointHotFactory static methods.  This would mean that
> >>>there would be no strong reference to a Point class external to the
> >>>PointComposite objects.  Does this make sense to you?  The class of
> >>>the internal Point object, i.e. inside the PointComposite would be
> >>>updated via a callback with a weak referenced listener.  This may all
> >>>be way too complex.  If so, then I can abandon it, but I think it
> >>>deserves a look.  I think maybe it could be made simple.
> >>>
> >>>
> >>>
> >>>Jack
> >>>
> >>>On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
> >>>
> >>>>Thanks, Craig,
> >>>>
> >>>>I am going to have to look into this more, then.  Interesting stuff in
> >>>>any event.
> >>>>
> >>>>Jack
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> >>>>
> >>>>>On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> >>>>>
> >>>>>
> >>>>>>Essentially, I am trying to keep a WeakReference to
> >>>>>>Point classes so that when I update the Point.class I can change the
> >>>>>>classes for all the PointImpl objects out there.
> >>>>>
> >>>>>My understanding of Java (extensive in many areas, but not necessarily
> >>>>>comprehensive here) is that this kind of replacement is *not* possible
> >>>>>at all.  At best, you can create new instances of the new class and
> >>>>>then transfer the state information -- but that still doesn't clean up
> >>>>>references that other objects will have to the old instance.
> >>>>>
> >>>>>
> >>>>>>Jack
> >>>>>
> >>>>>Craig
> >>>>>
> >>>>
> >>>>
> >>>>--
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>"You can't wake a person who is pretending to be asleep."
> >>>>
> >>>>~Native Proverb~
> >>>>
> >>>>"Each man is good in His sight. It is not necessary for eagles to be crows."
> >>>>
> >>>>~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >>>>
> >>>
> >>>--
> >>>
> >>>"You can't wake a person who is pretending to be asleep."
> >>>
> >>>~Native Proverb~
> >>>
> >>>"Each man is good in His sight. It is not necessary for eagles to be crows."
> >>>
> >>>~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >>>
> >>>---------------------------------------------------------------------
> >>
> >>
> >>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >>>For additional commands, e-mail: dev-help@struts.apache.org
> >>>
> >>>
> >>
> >
> >
> 
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Paul Speed <ps...@progeeks.com>.
I agree with Martin which is why I originally prefixed the subject with 
[OT] on my first response.

In the end, fleshed out, your stuff may be of interest.  But in the mean 
time, there are probably more appropriate places for you to learn about 
these parts of Java on your journey to realizing your ideas.

-Paul

Dakota Jack wrote:

> Thanks for your input, Martin, however .................................
> 
> I am doing this in an attempt to flush out HaD, Martin.  HaD is a
> potential Struts 2.0 implementation, which seems to be an eminently
> appropriate topic for a Struts developer list.
> 
> Jack
> 
> 
> On Thu, 2 Dec 2004 12:40:30 -0800, Martin Cooper <mf...@gmail.com> wrote:
> 
>>Please move this thread to a Java language mailing list. This
>>discussion is not related to Struts. Thanks.
>>
>>--
>>Martin Cooper
>>
>>
>>
>>
>>On Thu, 2 Dec 2004 12:30:03 -0800, Dakota Jack <da...@gmail.com> wrote:
>>
>>>Craig,
>>>
>>>I am thinking of doing a wrapper, e.g. PointComposite, which will then
>>>not have to be updated, because it will only adapt the signatures of
>>>the interface Point (not implement Point) but that the actual object
>>>doing the work will be a PointImpl which will soley be a weak
>>>reference and available only and updated internally as a Point object
>>>through the PointHotFactory static methods.  This would mean that
>>>there would be no strong reference to a Point class external to the
>>>PointComposite objects.  Does this make sense to you?  The class of
>>>the internal Point object, i.e. inside the PointComposite would be
>>>updated via a callback with a weak referenced listener.  This may all
>>>be way too complex.  If so, then I can abandon it, but I think it
>>>deserves a look.  I think maybe it could be made simple.
>>>
>>>
>>>
>>>Jack
>>>
>>>On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
>>>
>>>>Thanks, Craig,
>>>>
>>>>I am going to have to look into this more, then.  Interesting stuff in
>>>>any event.
>>>>
>>>>Jack
>>>>
>>>>
>>>>
>>>>
>>>>On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
>>>>
>>>>>On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
>>>>>
>>>>>
>>>>>>Essentially, I am trying to keep a WeakReference to
>>>>>>Point classes so that when I update the Point.class I can change the
>>>>>>classes for all the PointImpl objects out there.
>>>>>
>>>>>My understanding of Java (extensive in many areas, but not necessarily
>>>>>comprehensive here) is that this kind of replacement is *not* possible
>>>>>at all.  At best, you can create new instances of the new class and
>>>>>then transfer the state information -- but that still doesn't clean up
>>>>>references that other objects will have to the old instance.
>>>>>
>>>>>
>>>>>>Jack
>>>>>
>>>>>Craig
>>>>>
>>>>
>>>>
>>>>--
>>>>
>>>>
>>>>
>>>>
>>>>"You can't wake a person who is pretending to be asleep."
>>>>
>>>>~Native Proverb~
>>>>
>>>>"Each man is good in His sight. It is not necessary for eagles to be crows."
>>>>
>>>>~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>>>>
>>>
>>>--
>>>
>>>"You can't wake a person who is pretending to be asleep."
>>>
>>>~Native Proverb~
>>>
>>>"Each man is good in His sight. It is not necessary for eagles to be crows."
>>>
>>>~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>>>
>>>---------------------------------------------------------------------
>>
>>
>>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Thanks for your input, Martin, however .................................

I am doing this in an attempt to flush out HaD, Martin.  HaD is a
potential Struts 2.0 implementation, which seems to be an eminently
appropriate topic for a Struts developer list.

Jack


On Thu, 2 Dec 2004 12:40:30 -0800, Martin Cooper <mf...@gmail.com> wrote:
> Please move this thread to a Java language mailing list. This
> discussion is not related to Struts. Thanks.
> 
> --
> Martin Cooper
> 
> 
> 
> 
> On Thu, 2 Dec 2004 12:30:03 -0800, Dakota Jack <da...@gmail.com> wrote:
> > Craig,
> >
> > I am thinking of doing a wrapper, e.g. PointComposite, which will then
> > not have to be updated, because it will only adapt the signatures of
> > the interface Point (not implement Point) but that the actual object
> > doing the work will be a PointImpl which will soley be a weak
> > reference and available only and updated internally as a Point object
> > through the PointHotFactory static methods.  This would mean that
> > there would be no strong reference to a Point class external to the
> > PointComposite objects.  Does this make sense to you?  The class of
> > the internal Point object, i.e. inside the PointComposite would be
> > updated via a callback with a weak referenced listener.  This may all
> > be way too complex.  If so, then I can abandon it, but I think it
> > deserves a look.  I think maybe it could be made simple.
> >
> >
> >
> > Jack
> >
> > On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
> > > Thanks, Craig,
> > >
> > > I am going to have to look into this more, then.  Interesting stuff in
> > > any event.
> > >
> > > Jack
> > >
> > >
> > >
> > >
> > > On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> > > > On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> > > >
> > > > > Essentially, I am trying to keep a WeakReference to
> > > > > Point classes so that when I update the Point.class I can change the
> > > > > classes for all the PointImpl objects out there.
> > > >
> > > > My understanding of Java (extensive in many areas, but not necessarily
> > > > comprehensive here) is that this kind of replacement is *not* possible
> > > > at all.  At best, you can create new instances of the new class and
> > > > then transfer the state information -- but that still doesn't clean up
> > > > references that other objects will have to the old instance.
> > > >
> > > > > Jack
> > > >
> > > > Craig
> > > >
> > >
> > >
> > > --
> > >
> > >
> > >
> > >
> > > "You can't wake a person who is pretending to be asleep."
> > >
> > > ~Native Proverb~
> > >
> > > "Each man is good in His sight. It is not necessary for eagles to be crows."
> > >
> > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> > >
> >
> > --
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> > 
> > ---------------------------------------------------------------------
> 
> 
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Martin Cooper <mf...@gmail.com>.
Please move this thread to a Java language mailing list. This
discussion is not related to Struts. Thanks.

--
Martin Cooper


On Thu, 2 Dec 2004 12:30:03 -0800, Dakota Jack <da...@gmail.com> wrote:
> Craig,
> 
> I am thinking of doing a wrapper, e.g. PointComposite, which will then
> not have to be updated, because it will only adapt the signatures of
> the interface Point (not implement Point) but that the actual object
> doing the work will be a PointImpl which will soley be a weak
> reference and available only and updated internally as a Point object
> through the PointHotFactory static methods.  This would mean that
> there would be no strong reference to a Point class external to the
> PointComposite objects.  Does this make sense to you?  The class of
> the internal Point object, i.e. inside the PointComposite would be
> updated via a callback with a weak referenced listener.  This may all
> be way too complex.  If so, then I can abandon it, but I think it
> deserves a look.  I think maybe it could be made simple.
> 
> 
> 
> Jack
> 
> On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
> > Thanks, Craig,
> >
> > I am going to have to look into this more, then.  Interesting stuff in
> > any event.
> >
> > Jack
> >
> >
> >
> >
> > On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> > > On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> > >
> > > > Essentially, I am trying to keep a WeakReference to
> > > > Point classes so that when I update the Point.class I can change the
> > > > classes for all the PointImpl objects out there.
> > >
> > > My understanding of Java (extensive in many areas, but not necessarily
> > > comprehensive here) is that this kind of replacement is *not* possible
> > > at all.  At best, you can create new instances of the new class and
> > > then transfer the state information -- but that still doesn't clean up
> > > references that other objects will have to the old instance.
> > >
> > > > Jack
> > >
> > > Craig
> > >
> >
> >
> > --
> >
> >
> >
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> 
> --
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Craig,

I am thinking of doing a wrapper, e.g. PointComposite, which will then
not have to be updated, because it will only adapt the signatures of
the interface Point (not implement Point) but that the actual object
doing the work will be a PointImpl which will soley be a weak
reference and available only and updated internally as a Point object
through the PointHotFactory static methods.  This would mean that
there would be no strong reference to a Point class external to the
PointComposite objects.  Does this make sense to you?  The class of
the internal Point object, i.e. inside the PointComposite would be
updated via a callback with a weak referenced listener.  This may all
be way too complex.  If so, then I can abandon it, but I think it
deserves a look.  I think maybe it could be made simple.

Jack


On Thu, 2 Dec 2004 12:10:58 -0800, Dakota Jack <da...@gmail.com> wrote:
> Thanks, Craig,
> 
> I am going to have to look into this more, then.  Interesting stuff in
> any event.
> 
> Jack
> 
> 
> 
> 
> On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> > On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> >
> > > Essentially, I am trying to keep a WeakReference to
> > > Point classes so that when I update the Point.class I can change the
> > > classes for all the PointImpl objects out there.
> >
> > My understanding of Java (extensive in many areas, but not necessarily
> > comprehensive here) is that this kind of replacement is *not* possible
> > at all.  At best, you can create new instances of the new class and
> > then transfer the state information -- but that still doesn't clean up
> > references that other objects will have to the old instance.
> >
> > > Jack
> >
> > Craig
> >
> 
> 
> --
> 
> 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Thanks, Craig,

I am going to have to look into this more, then.  Interesting stuff in
any event.

Jack


On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:
> 
> > Essentially, I am trying to keep a WeakReference to
> > Point classes so that when I update the Point.class I can change the
> > classes for all the PointImpl objects out there.
> 
> My understanding of Java (extensive in many areas, but not necessarily
> comprehensive here) is that this kind of replacement is *not* possible
> at all.  At best, you can create new instances of the new class and
> then transfer the state information -- but that still doesn't clean up
> references that other objects will have to the old instance.
> 
> > Jack
> 
> Craig
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Craig McClanahan <cr...@gmail.com>.
On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <da...@gmail.com> wrote:

> Essentially, I am trying to keep a WeakReference to
> Point classes so that when I update the Point.class I can change the
> classes for all the PointImpl objects out there.

My understanding of Java (extensive in many areas, but not necessarily
comprehensive here) is that this kind of replacement is *not* possible
at all.  At best, you can create new instances of the new class and
then transfer the state information -- but that still doesn't clean up
references that other objects will have to the old instance.

> Jack

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Good points, Paul,

I definitely agree that this is only for a few key classes, Paul. 
There is no reason to think at this stage that it would be other than
for framework classes.  I have to think through whether that would in
itself be worthwhile.  Thanks for your input.

Jack


On Thu, 02 Dec 2004 15:42:09 -0500, Paul Speed <ps...@progeeks.com> wrote:
> I don't think weak referencing is going to help you.  As Craig
> mentioned, an Object is immutably tied to its Class... which is
> immutably tied to its ClassLoader.
> 
> If Foo has a reference to Bar and you want to replace Bar's
> implementation (BarImpl) at runtime without effecting Foo then you are
> going to have to decouple them, by using some sort of interceptor
> pattern with dynamic proxies, or what have you.  As long as Bar's
> interface doesn't change then everything should work.
> 
> And that's not particularly hard.  Where it gets interesting is when
> setting up this relationship in the first place since you have to give
> Foo a proxy implementing the Bar interface instead of a direct reference
> to BarImpl.  This is where dependency injection could come into play
> since it can do whatever pre-processing it wants on the objects before
> connecting them together.
> 
> And the real tricky part is synchronizing all of this so that Foo
> doesn't get confused if Bar gives it a different answer than it expects
> (because it's implementation changed mid-interrogation).
> 
> In the end, you end up with a whole lot of class loaders and extra
> synchronization just so you don't have to reload the application space
> when one or two classes change.  It may be worth it for some key
> interfaces, but as a general practice it's probably prohibitively
> expensive and error prone.  And for those key interfaces, it's almost
> always better to have both parties involved in the negotiation, ie: tell
> Foo it has a new Bar implementation so it can synch its logic properly.
> 
> -Paul
> 
> 
> 
> Dakota Jack wrote:
> 
> > Paul and Craig
> >
> > I am getting what I expect with the following code (see below), thanks
> > to Craig, but not with the code which you can find at
> > http://131.191.32.112:8080/classes.zip and I am not sure what the
> > difference is.  Essentially, I am trying to keep a WeakReference to
> > Point classes so that when I update the Point.class I can change the
> > classes for all the PointImpl objects out there.  Not sure what is
> > going wrong.  If you could take a peek, that would be great.  Thanks.
> >
> > Jack
> >
> > package com.crackwillow.deploy;
> >
> > import java.lang.ref.Reference;
> > import java.lang.ref.WeakReference;
> >
> > public class MyReference {
> >   public static void main(String [] params) {
> >     CheckPlease cp = new CheckPlease();
> >     cp.setBill("1.01");
> >     WeakReference wr = new WeakReference(cp);
> >     ((CheckPlease)((Reference)wr).get()).setBill("5.03");
> >     System.out.println(cp);
> >   }
> > }
> >
> > class CheckPlease {
> >   private String bill = "0.00";
> >
> >   public void setBill(String add) {
> >     if(add == null) add = "freebee";
> >     else bill += " + " + add;
> >   }
> >
> >   public String getBill() {
> >     return bill;
> >   }
> >
> >   public String toString() {
> >     return bill;
> >   }
> > }
> >
> >
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Paul Speed <ps...@progeeks.com>.
I don't think weak referencing is going to help you.  As Craig 
mentioned, an Object is immutably tied to its Class... which is 
immutably tied to its ClassLoader.

If Foo has a reference to Bar and you want to replace Bar's 
implementation (BarImpl) at runtime without effecting Foo then you are 
going to have to decouple them, by using some sort of interceptor 
pattern with dynamic proxies, or what have you.  As long as Bar's 
interface doesn't change then everything should work.

And that's not particularly hard.  Where it gets interesting is when 
setting up this relationship in the first place since you have to give 
Foo a proxy implementing the Bar interface instead of a direct reference 
to BarImpl.  This is where dependency injection could come into play 
since it can do whatever pre-processing it wants on the objects before 
connecting them together.

And the real tricky part is synchronizing all of this so that Foo 
doesn't get confused if Bar gives it a different answer than it expects 
(because it's implementation changed mid-interrogation).

In the end, you end up with a whole lot of class loaders and extra 
synchronization just so you don't have to reload the application space 
when one or two classes change.  It may be worth it for some key 
interfaces, but as a general practice it's probably prohibitively 
expensive and error prone.  And for those key interfaces, it's almost 
always better to have both parties involved in the negotiation, ie: tell 
Foo it has a new Bar implementation so it can synch its logic properly.

-Paul

Dakota Jack wrote:

> Paul and Craig
> 
> I am getting what I expect with the following code (see below), thanks
> to Craig, but not with the code which you can find at
> http://131.191.32.112:8080/classes.zip and I am not sure what the
> difference is.  Essentially, I am trying to keep a WeakReference to
> Point classes so that when I update the Point.class I can change the
> classes for all the PointImpl objects out there.  Not sure what is
> going wrong.  If you could take a peek, that would be great.  Thanks.
> 
> Jack
> 
> package com.crackwillow.deploy;
> 
> import java.lang.ref.Reference;
> import java.lang.ref.WeakReference;
> 
> public class MyReference {
>   public static void main(String [] params) {
>     CheckPlease cp = new CheckPlease();
>     cp.setBill("1.01");
>     WeakReference wr = new WeakReference(cp);
>     ((CheckPlease)((Reference)wr).get()).setBill("5.03");
>     System.out.println(cp);
>   }
> }
> 
> class CheckPlease {
>   private String bill = "0.00";
> 
>   public void setBill(String add) {
>     if(add == null) add = "freebee";
>     else bill += " + " + add;
>   }
> 
>   public String getBill() {
>     return bill;
>   }
> 
>   public String toString() {
>     return bill;
>   }
> }
> 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Paul and Craig

I am getting what I expect with the following code (see below), thanks
to Craig, but not with the code which you can find at
http://131.191.32.112:8080/classes.zip and I am not sure what the
difference is.  Essentially, I am trying to keep a WeakReference to
Point classes so that when I update the Point.class I can change the
classes for all the PointImpl objects out there.  Not sure what is
going wrong.  If you could take a peek, that would be great.  Thanks.

Jack

package com.crackwillow.deploy;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;

public class MyReference {
  public static void main(String [] params) {
    CheckPlease cp = new CheckPlease();
    cp.setBill("1.01");
    WeakReference wr = new WeakReference(cp);
    ((CheckPlease)((Reference)wr).get()).setBill("5.03");
    System.out.println(cp);
  }
}

class CheckPlease {
  private String bill = "0.00";

  public void setBill(String add) {
    if(add == null) add = "freebee";
    else bill += " + " + add;
  }

  public String getBill() {
    return bill;
  }

  public String toString() {
    return bill;
  }
}



"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Paul Speed <ps...@progeeks.com>.
Ok, I haven't run this, but let me try to interpret what I see inline...

Dakota Jack wrote:

> Thanks for the response, Paul.  Here's what I am up to.  I can get an
> object from the weak reference created from a strong reference.  What
> I want to do, and am not sure if I can (I am starting to think I
> cannot), is to grab the object with the weak reference and make
> changes which will happen also with the strong reference.  So far, it
> seems that when I have the object of a weak reference created form a
> strong reference and change this object, it does not affect the object
> of the strong reference.
> 
> E.g.
> 
> package com.crackwillow.deploy;
> 
> import java.lang.ref.WeakReference;
> import java.lang.ref.Reference;
> 
> public class MyReference {
>   public static void main(String [] params) {
>     String        string = new String("Aaaaaaaaaa");

Created a string containing "Aaaaaaa".

>     WeakReference wr     = new WeakReference(string);

Created a weak reference to said string "Aaaaaa".

>     wr = replace(wr);

Created a second weak reference to a different string "Baaaaa".

>     System.out.println(string);

Print "Aaaaaa".

>     System.out.println(wr);

Print the second weak reference

>     string = (String)((Reference)wr).get();

Set string to be the second created string "Baaaaa".

>     System.out.println(string);

Print "Baaaaa".

At least that's what I'd expect it to do.

>   }
> 
>   public static WeakReference replace(WeakReference wr) {
>     return new WeakReference(((String)wr.get()).replaceAll("A","B"));
>   }
> }
> 
> Apparently there is no connection between the objects referred to by
> string and wr in the code shown above.

Well, sure.  Because you've replaced your old wr reference with a 
completely new one containing a completely different String reference.

> 
> Is this clearer?

Some things are definitely clearer. ;)
-Paul

> 
> Jack
> 
> 
> On Thu, 02 Dec 2004 02:03:39 -0500, Paul Speed <ps...@progeeks.com> wrote:
> 
>>A WeakReference is just a way of holding a reference to an object that
>>will not keep it from being garbage collected (a very useful thing).
>>There are also ways that you can track when it has been garbage
>>collected.  Once it has been garbage collected, it's gone though.  All
>>you have is any data you originally associated with your WeakReference
>>(by subclassing or some other method).  You cannot access the referenced
>>object anymore because it doesn't exist.
>>
>>While the object still exists (ie: is strongly referenced some where),
>>you can still access it through the WeakReference.  You just have to
>>expect that at some point you may go to retrieve it from the
>>WeakReference and get a null.
>>
>>Maybe it would help to know what you are trying to do with it.  There
>>are other Reference implementations that may be better suited.
>>
>>-Paul
>>
>>Dakota Jack wrote:
>>
>>
>>>Working here on a "new" paradigm, sort of, I think.
>>>
>>>Apparently you can track what has happened to a strong reference with
>>>a weak reference but you cannot manipulate the object referred to by
>>>the strong reference by manipulating the weak reference.  Is that
>>>right?  Seems odd to me.
>>>
>>>Jack
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Another way of putting my question, maybe, is: why do these == return
different values:

package com.crackwillow.deploy;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;

public class MyReference {
  public static void main(String [] params) {
    CheckPlease cp = new CheckPlease();
    cp.setBill("1.01");
    WeakReference wr = new WeakReference(cp);
    System.out.println("(cp == (CheckPlease)wr.get()): " + (cp ==
(CheckPlease)wr.get()));
    cp = new CheckPlease();
    System.out.println("(cp == (CheckPlease)wr.get()): " + (cp ==
(CheckPlease)wr.get()));
  }
}

class CheckPlease {
  private String bill = "0.00";

  public void setBill(String add) {
    if(add == null) add = "freebee";
    else bill += " + " + add;
  }

  public String getBill() {
    return bill;
  }

  public String toString() {
    return bill;
  }
}



On Thu, 2 Dec 2004 10:18:33 -0800, Dakota Jack <da...@gmail.com> wrote:
> On Thu, 2 Dec 2004 00:05:12 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> > Don't forget that Strings are immutable in Java :-).
> >
> > You might have better luck experimenting with a JavaBean that has
> > getters/setters for the properties you want to be able to mess with.
> >
> > Craig
> >
> >
> 
> Thanks, Craig:
> 
> You are right.  I definitely should "unmuddy" the waters here.  Thanks, again.
> 
> Jack
> 
> 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
On Thu, 2 Dec 2004 00:05:12 -0800, Craig McClanahan <cr...@gmail.com> wrote:
> Don't forget that Strings are immutable in Java :-).
> 
> You might have better luck experimenting with a JavaBean that has
> getters/setters for the properties you want to be able to mess with.
> 
> Craig
> 
> 

Thanks, Craig:

You are right.  I definitely should "unmuddy" the waters here.  Thanks, again.

Jack



"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Craig McClanahan <cr...@gmail.com>.
Don't forget that Strings are immutable in Java :-).

You might have better luck experimenting with a JavaBean that has
getters/setters for the properties you want to be able to mess with.

Craig


On Wed, 1 Dec 2004 23:44:38 -0800, Dakota Jack <da...@gmail.com> wrote:
> Thanks for the response, Paul.  Here's what I am up to.  I can get an
> object from the weak reference created from a strong reference.  What
> I want to do, and am not sure if I can (I am starting to think I
> cannot), is to grab the object with the weak reference and make
> changes which will happen also with the strong reference.  So far, it
> seems that when I have the object of a weak reference created form a
> strong reference and change this object, it does not affect the object
> of the strong reference.
> 
> E.g.
> 
> package com.crackwillow.deploy;
> 
> import java.lang.ref.WeakReference;
> import java.lang.ref.Reference;
> 
> public class MyReference {
>   public static void main(String [] params) {
>     String        string = new String("Aaaaaaaaaa");
>     WeakReference wr     = new WeakReference(string);
>     wr = replace(wr);
>     System.out.println(string);
>     System.out.println(wr);
>     string = (String)((Reference)wr).get();
>     System.out.println(string);
>   }
> 
>   public static WeakReference replace(WeakReference wr) {
>     return new WeakReference(((String)wr.get()).replaceAll("A","B"));
>   }
> }
> 
> Apparently there is no connection between the objects referred to by
> string and wr in the code shown above.
> 
> Is this clearer?
> 
> Jack
> 
> 
> 
> 
> On Thu, 02 Dec 2004 02:03:39 -0500, Paul Speed <ps...@progeeks.com> wrote:
> > A WeakReference is just a way of holding a reference to an object that
> > will not keep it from being garbage collected (a very useful thing).
> > There are also ways that you can track when it has been garbage
> > collected.  Once it has been garbage collected, it's gone though.  All
> > you have is any data you originally associated with your WeakReference
> > (by subclassing or some other method).  You cannot access the referenced
> > object anymore because it doesn't exist.
> >
> > While the object still exists (ie: is strongly referenced some where),
> > you can still access it through the WeakReference.  You just have to
> > expect that at some point you may go to retrieve it from the
> > WeakReference and get a null.
> >
> > Maybe it would help to know what you are trying to do with it.  There
> > are other Reference implementations that may be better suited.
> >
> > -Paul
> >
> > Dakota Jack wrote:
> >
> > > Working here on a "new" paradigm, sort of, I think.
> > >
> > > Apparently you can track what has happened to a strong reference with
> > > a weak reference but you cannot manipulate the object referred to by
> > > the strong reference by manipulating the weak reference.  Is that
> > > right?  Seems odd to me.
> > >
> > > Jack
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> 
> --
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [OT] Re: WeakReference

Posted by Dakota Jack <da...@gmail.com>.
Thanks for the response, Paul.  Here's what I am up to.  I can get an
object from the weak reference created from a strong reference.  What
I want to do, and am not sure if I can (I am starting to think I
cannot), is to grab the object with the weak reference and make
changes which will happen also with the strong reference.  So far, it
seems that when I have the object of a weak reference created form a
strong reference and change this object, it does not affect the object
of the strong reference.

E.g.

package com.crackwillow.deploy;

import java.lang.ref.WeakReference;
import java.lang.ref.Reference;

public class MyReference {
  public static void main(String [] params) {
    String        string = new String("Aaaaaaaaaa");
    WeakReference wr     = new WeakReference(string);
    wr = replace(wr);
    System.out.println(string);
    System.out.println(wr);
    string = (String)((Reference)wr).get();
    System.out.println(string);
  }

  public static WeakReference replace(WeakReference wr) {
    return new WeakReference(((String)wr.get()).replaceAll("A","B"));
  }
}

Apparently there is no connection between the objects referred to by
string and wr in the code shown above.

Is this clearer?

Jack


On Thu, 02 Dec 2004 02:03:39 -0500, Paul Speed <ps...@progeeks.com> wrote:
> A WeakReference is just a way of holding a reference to an object that
> will not keep it from being garbage collected (a very useful thing).
> There are also ways that you can track when it has been garbage
> collected.  Once it has been garbage collected, it's gone though.  All
> you have is any data you originally associated with your WeakReference
> (by subclassing or some other method).  You cannot access the referenced
> object anymore because it doesn't exist.
> 
> While the object still exists (ie: is strongly referenced some where),
> you can still access it through the WeakReference.  You just have to
> expect that at some point you may go to retrieve it from the
> WeakReference and get a null.
> 
> Maybe it would help to know what you are trying to do with it.  There
> are other Reference implementations that may be better suited.
> 
> -Paul
> 
> Dakota Jack wrote:
> 
> > Working here on a "new" paradigm, sort of, I think.
> >
> > Apparently you can track what has happened to a strong reference with
> > a weak reference but you cannot manipulate the object referred to by
> > the strong reference by manipulating the weak reference.  Is that
> > right?  Seems odd to me.
> >
> > Jack
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[OT] Re: WeakReference

Posted by Paul Speed <ps...@progeeks.com>.
A WeakReference is just a way of holding a reference to an object that 
will not keep it from being garbage collected (a very useful thing). 
There are also ways that you can track when it has been garbage 
collected.  Once it has been garbage collected, it's gone though.  All 
you have is any data you originally associated with your WeakReference 
(by subclassing or some other method).  You cannot access the referenced 
object anymore because it doesn't exist.

While the object still exists (ie: is strongly referenced some where), 
you can still access it through the WeakReference.  You just have to 
expect that at some point you may go to retrieve it from the 
WeakReference and get a null.

Maybe it would help to know what you are trying to do with it.  There 
are other Reference implementations that may be better suited.

-Paul

Dakota Jack wrote:

> Working here on a "new" paradigm, sort of, I think.
> 
> Apparently you can track what has happened to a strong reference with
> a weak reference but you cannot manipulate the object referred to by
> the strong reference by manipulating the weak reference.  Is that
> right?  Seems odd to me.
> 
> Jack
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org