Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Fabiana Ferrrari   on Apr 20 In Java Category.

  
Question Answered By: Feodora Bonkob   on Apr 20

there are loads of examples, just google it.

to answer the question Re: multithreading in java  I recommend you to read through "Allen Holub" website and his series of related articles in www.javaworld.com

this one is one of the 9th series of related articles - you can find the previous ones in the same site.
i.e http://www.javaworld.com/javaworld/jw-06-1999/jw-06-toolbox.html

it will give you running good examples

or in addition http://java.sys-con.com/read/83057.htm

but from the fact that this is a J2EE discussion group, I have a question for you,

are you trying to do this in the J2EE framework? If not just be careful with the overhead of single thread per user, you might be able to do this by a thread coordinator and thread pool to achieve better efficiency. don't create  a thread per request, this will cost you the performance of your system.

if you are deciding to do this in J2EE framework, you shouldn't worry about it, this is beyond your control, just implement an entery session per user  and let that one to interact with multiple  transaction to fulfil a single request - I leave the investigation on the proper pattern for yourself.

note: parallel reading from DB required extensive control for synchronization purpose, you might need to consider transaction attributes and lock/unlock on the data sources.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on MultiThread Or get search suggestion and latest updates.


Tagged: