Re: Const in java

1999-10-13 Thread Gordon Keith

[EMAIL PROTECTED] wrote:
> 
> On Wed, 13 Oct 1999, Robert Simmons wrote:
> 
> > Since everything in java is passed by reference this becomes even more of an issue.
> > Therefore can I do the following to achieve the desired safety ?
> 
> Well, everything is not passed by reference in Java.  I believe primitives
> and immutable types are passed by value.  Someone know the exact rules
> behind this? 

Everything is passed by value. 
But you never actually pass objects, you only ever pass references to
objects.

Making a parameter final means you can't change what object that
parameter refers to. (you can still make changes to the object, if it's
not immutable)

Once you understand that its pretty clear what's happening.

Regards
Gordon


Gordon Keith
Programmer
Marine Science Support
Australian Antarctic Divsion
http://www.antdiv.gov.au


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: jsdk2.0 connection problem

1999-11-17 Thread Gordon Keith

[EMAIL PROTECTED] wrote:
> 
> When I run the jsdk2.0 server and try to bring up a servlet it gives me
> the following error:
> 
> "A network error occured while netscape was recieving data: (Network
> error:
> connection reset by peer.)
> 
> try connecting again."
> 
> This doesn't happen when using the jsdk1.0 version.

I certainly got this problem with jsdk1.0 and 2.0, but it happens much
earlier and more often in 2.0. The problem doesn't occur on Solaris or
NT using the same JSDK (which is pure java).

I found it occurred on about half the connections on 1.0, but normally
after all the data had been sent to the client.

With 2.0 it occurs much more often, often before significant amounts of
data have been sent to the client.

I suspect some sort of bug in JSDK that relies on some sort of automatic
buffer flushing that doesn't occur on the linux JVM. 

I think I've tested under both the blackdown 1.1.7 and 1.2pre2. 

I don't think the problem exists under the IBM JVMs.

I haven't tested extensively, but those are my observations.

Let me know if you find a solution.

Hope it helps
Gordon


Gordon Keith
Programmer
Marine Science Support
Australian Antarctic Division
http://www.antdiv.gov.au


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: jsdk2.0 connection problem

1999-01-16 Thread Gordon Keith

"Anders Lindbäck" wrote:

> > > I suspect some sort of bug in JSDK that relies on some sort of automatic
> > > buffer flushing that doesn't occur on the linux JVM.
> 
> Are you closing the PrintWriter so they send the data before
> the servlet dies  ?!?

Certainly are.

Regards
Gordon


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: jsdk2.0 connection problem

1999-01-16 Thread Gordon Keith

Joseph Shraibman wrote:
> 
> Gordon Keith wrote:
> 
> > I certainly got this problem with jsdk1.0 and 2.0, but it happens much
> > earlier and more often in 2.0. 

Correction: The problem occurs with 2.0 and more often with 2.1 (I got
my versions confused).

> What servlet engine are you using?  Apache Jserv?

The servlet engine that comes with the jsdk. 
It was primarily for testing and I haven't had enough linux/Apache
experience to attempt the Jserv install.

Regards
Gordon


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]