Re: [OT] Re: WeakReference

2004-12-02 Thread Craig McClanahan
f-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

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
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

Re: [OT] Re: WeakReference

2004-12-02 Thread Martin Cooper
more, then. Interesting stuff in > > > > any event. > > > > > > > > Jack > > > > > > > > > > > > > > > > > > > > On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <[EMAIL PROTECTED]> > > &g

Re: [OT] Re: WeakReference

2004-12-02 Thread Paul Speed
m 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 <[EMAIL PROTECTED]> wrote: On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: Essentially, I am trying to keep a WeakReference t

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
gt; > -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

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
more, then. Interesting stuff in > > > any event. > > > > > > Jack > > > > > > > > > > > > > > > On Thu, 2 Dec 2004 12:07:28 -0800, Craig McClanahan <[EMAIL PROTECTED]> > > > wrote: > > >

Re: [OT] Re: WeakReference

2004-12-02 Thread Martin Cooper
gt; > > wrote: > > > On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > > > > > > > Essentially, I am trying to keep a WeakReference to > > > > Point classes so that when I update the Point.class I can change the > >

Re: [OT] Re: WeakReference

2004-12-02 Thread Paul Speed
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

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
:56:31 -0800, Dakota Jack <[EMAIL PROTECTED]> 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 understand

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
entially, 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 th

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
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 == (CheckP

Re: [OT] Re: WeakReference

2004-12-02 Thread Craig McClanahan
On Thu, 2 Dec 2004 11:56:31 -0800, Dakota Jack <[EMAIL PROTECTED]> 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 (ex

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
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

Re: [OT] Re: WeakReference

2004-12-02 Thread Dakota Jack
On Thu, 2 Dec 2004 00:05:12 -0800, Craig McClanahan <[EMAIL PROTECTED]> 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 > > Thank

Re: [OT] Re: WeakReference

2004-12-02 Thread Paul Speed
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) { Stringstring = new String("Aa"); Created a string containing "Aaa".

Re: [OT] Re: WeakReference

2004-12-02 Thread Craig McClanahan
y; > > import java.lang.ref.WeakReference; > import java.lang.ref.Reference; > > public class MyReference { > public static void main(String [] params) { > String string = new String("Aa"); > WeakReference wr = new WeakReference(string);

Re: [OT] Re: WeakReference

2004-12-01 Thread Dakota Jack
mport java.lang.ref.Reference; public class MyReference { public static void main(String [] params) { Stringstring = new String("Aaaaaa"); WeakReference wr = new WeakReference(string); wr = replace(wr); System.out.println(string); System.out.println(wr); s

[OT] Re: WeakReference

2004-12-01 Thread Paul Speed
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 i

WeakReference

2004-12-01 Thread Dakota Jack
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 -- "Y