Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

napoleon_in_rags

(3,992 posts)
8. Maybe its your boss's love of static methods.
Mon Jun 17, 2013, 01:48 PM
Jun 2013

This is java we're talking about right? If I recall, static methods are called on the class, not the object. So then static attributes will appear for all pages simultaneously. Maybe that's created trouble for him in the past.

I thought the java model was to instantiate a servlet, (object) and then call its service() method in its own thread. Then all you have to worry about is external files, network connections, etc, just like an web app, you have to make sure no conflicts happen there. But that's fricking simple, its called the "synchronized" keyword:

http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html

Recommendations

0 members have recommended this reply (displayed in chronological order):

Latest Discussions»Retired Forums»Website, DB, & Software Developers»Do I need to worry about ...»Reply #8