× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dan,

Since it sounds like you are dealing with Servlets, I would look
at examples as ta good source of information. I use Struts, which
provides quite a few examples that have been reviewed by
quite a few people. In addition to jakarta.apache.org/struts, a
good site for Struts information is www.husted.com.

The interface examples with Struts are somewhat procedural.
They lend themselves to passing instance variables. Your
beans that handle your backend logic should fit the OO model.
That is where you have to be more careful.

David Morris

>>> daniel.eyers@honeywell.com 04/17/02 01:02PM >>>

Actually, I was looking at Java in general, although I have an
immediate need of JSP/Servlets.  I visualize
classes/objects as being sort of variables on steroids; each class that
implements other classes has it's own copy of
the class/object in the scope of the instantiating class.  As a learn
more about java, that model breaks down,
especially with containers like WAS and Tomcat.  Apparently, they all
share the code (and can share the instance
variables with static).  Since local variables are not shared, I can
use them without concern.

My simple model (above) breaks down really fast in discussions of
threads and thread-safe coding.  I'm still trying to
grasp the concept of sharing code with other requests.  If a change an
instance variable that is *not* a static, it
seems to me (with my meager understanding of Java) that it changes for
that particular instantiation of the object.
However, the need to make things thread-safe seems to contradict that
assumption.

My hope is that if I understand this point, I can better comprehend
threads which is a huge leap for me (*lots* of
procedural language (RPG, COBOL, BASIC, PASCAL, etc.) experience. This
multi-threaded stuff reminds me of why I didn't
become an electrical engineer).

I guess I'm looking for two things.  One, why is there a need for
thread-safe techniques (the web sites I have read
really don't do a good job of telling me why, even Sun's site) and Two,
how to best combat this situation in the context
of JSP/servlet technology.

Clear as mud?

dan


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.