commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: TelnetClient in common.net v2.0
Date Thu, 28 May 2009 08:43:54 GMT
On 28/05/2009, Dale Harris <itsupport@martinjonkersmotors.com.au> wrote:
> Hi Sebb,
>
>  I would have thought in an object orientated language like Java, I would
>  have thought that obtaining a reference to a child object and updating it,
>  it would then automatically be reflected through the parent object.

Sorry, you're right that the properties will be updated.

[Not sure how that relates to object orientation; getProperties()
could equally return a copy of the properties (which is what I thought
it did, but I just checked).]

>  I have checked System.getProperty() for the following items after I removed
>  them, and they then return null.
>

But what does System.getProperty() show before removal?

I.e. does the change make any difference?

Also, you need to check that the change occurs before the relevant
system properties are first used, as they are likely to be cached.

>  Regards,
>
>  Dale Harris
>  IT Support
>
>
>  -----Original Message-----
>
> From: sebb [mailto:sebbaz@gmail.com]
>  Sent: Thursday, 28 May 2009 9:25
>  To: Commons Users List
>  Subject: Re: TelnetClient in common.net v2.0
>
>  On 27/05/2009, Dale Harris <itsupport@martinjonkersmotors.com.au> wrote:
>  > Thanks for the idea, but doesn't appear to work.  I've added the following
>  >  method to my app to disable the socks proxy host to no joy.
>  >
>  >   private void disableSocksProxy() {
>  >     Properties sysprops = System.getProperties();
>  >     sysprops.remove("socksProxyHost");
>  >     sysprops.remove("socksProxyPort");
>  >     sysprops.remove("java.net.socks.username");
>  >     sysprops.remove("java.net.socks.password");
>  >   }
>
>  That only deletes the properties from "sysprops"; it does not delete
>  the system properties themselves.
>
>  I suggest you display the values of the properties to see if they are
>  actually set.
>
>  >  The only way around my issue that I've found so far is to create a
>  >  SocketFactory for the TelnetClient to use.
>  >
>  >
>  >  Regards,
>  >
>  >  Dale Harris
>  >  IT Support
>  >
>  >
>  >  -----Original Message-----
>  >
>  > From: James Carman [mailto:james@carmanconsulting.com]
>  >  Sent: Wednesday, 27 May 2009 21:08
>  >  To: Commons Users List
>  >  Subject: Re: TelnetClient in common.net v2.0
>  >
>  >  On Wed, May 27, 2009 at 6:58 AM, James Carman
>  >  <james@carmanconsulting.com> wrote:
>  >  > There are system properties you can set to "turn on" proxies for the
>  >  > Java networking classes.  That's the default way that Socket would
>  >  > become proxy-aware.
>  >  >
>  >
>  >  FYI:
>  >
>  >  http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  >  For additional commands, e-mail: user-help@commons.apache.org
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  >  For additional commands, e-mail: user-help@commons.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message