----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Dear Nick

Thanks for your enormously helpful post.  You clarify just about all of
my doubts very succinctly.

A couple of minor points though ..

Nick Bauman wrote:
> 
> 
> Secondly, even if you plan to use green threads in
> production, use native threads in development anyway.
> Green threads can sometimes hide thread-saftey issues
> that becoming glaring when using native threads.

You seem to be suggesting green-threads are better for a production
environment ... which contradicts my understanding..?

I'm using Blackdown JDK 2.0 pre-release 1.0 right now, on RedHat 5.2,
which gives me native threads .  Would you still recommend IBM 1.1.8?


> Note that native threads will often appear slower than
> green threads unless you are using a threadpool.

Do you roll-your-own threadpool or can you recommend one?


> Third, mySQL: I remember now mySQL doesn't support
> transactions. I believe you still need to committ
> after each transaction, but I would look it up or
> defer to others that have used jdbc with things like
> Oracle and mySQL both. I have experience with only
> Oracle and Sybase, and these definitely will run out
> of cursors if you don't commit your reads.

I'm using Marc Mnich's dbConnectionBroker and don't have problems of
running out of connections, at least.  You are saying that it is the
databases that run out of cursors, not JDBC, right?  If so then I
probably don't need to worry.  If not then I'll definitely see if
rigorously performing commits helps with this, so thanks VERY much for
that tip.

Nevertheless, I do seem to have memory problems.  This "free" is taken
after a week on-line, serving about 250 users per day.

]free
]      total       used       free     shared    buffers     cached
]Mem:  256040     251408       4632      20508      91820     127224
]-/+ buffers/cache:      32364     223676
]Swap:       128484          0     128484

After startup and serving the first user I have over 200Mb free.  After
a week I have only 4Mb free!  I should confess I don't fully understand
the "free" listing yet nor how much of the memory is really
unavailable.  Know a good tutorial on that?


> Finally, I can't think of a reason why you should need
> to synchronize any servlet unless you are accessing
> resources that are inter-servlet accessable.

I was seeing one user's data appearing in another user's session!!! 
Synchronizing EVERYTHING allowed us to get on with testing.

I've subsequently corrected a bunch of classes inadvertently declared as
"static", but haven't yet had the time to go back in and clear up all
the "synchronized" bits.  The critical issue right now is to get the
thing through usability testing, (most of the users have never used a
computer before, let alone interactively by Internet).  But I want to
get rid of memory problems so I can sleep at night :^)

I can't tell you how much I appreciate your authoritative answers. 
Thanks very much.

Hasan


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to