Solved

Multithreading implemetation

Posted on 2013-06-22
5
209 Views
Last Modified: 2013-06-23
Hello,

I get lot of question being asked  as "where one has to use multi threading implementation environment"
i hope, it is not at the  receiving of large no of requests which would be not at   Servlet, as it will allow only single threading environment or synchronisation  

can one use  it in maintaining at the resource pooling in terms of caching environment...
Any more suggestion would be appreciated in terms of code....

thanks
0
Comment
Question by:roy_sanu
  • 3
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Not quite sure what you're saying about servlets. They are by default multithreaded
0
 
LVL 16

Expert Comment

by:krakatoa
Comment Utility
Anywhere you need to replicate a task asynchronously.
0
 

Author Comment

by:roy_sanu
Comment Utility
thanks all.
Since in multithreaded servlets, all the user shares the same instance(if I understand correctly), the instance varibles will also be shared by all the clients. This is apparently a problem. The approach is handle this is to avoid using instance variable in multithreaded servlets? How that can be achieve ???
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
Comment Utility
How that can be achieve ???
By using automatic (local) variables

http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe.html?page=1

Or use synchronization techniques (see above link)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
powerN  challenge 3 46
wordappend challenge 8 84
eclipse package explorer vs project explorer view 2 27
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now