aspose file tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Thread problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "Thread problem" Watch "Thread problem" New topic
Author

Thread problem

Duy Luong
Greenhorn

Joined: Jul 17, 2005
Posts: 6
hi masters

as restriction of ejb we not recommend to create thread in ejb bean. But is it ok when you create thread in DAO layer
Jeremy Hsu
Ranch Hand

Joined: Mar 28, 2005
Posts: 79
Well, this is a very tough question. Please post more about why you want to use thread in your DAO. The answer could be a yes or no.
[ August 29, 2005: Message edited by: Jeremy Hsu ]
Hitry Mitry
Ranch Hand

Joined: Jun 16, 2005
Posts: 32
I think it's little strange to create threads in the DAO layer - you already have multiple threads - one per user session- started by the servlet and propagated to the EJB layer. Why would you need more?
Jeremy Hsu
Ranch Hand

Joined: Mar 28, 2005
Posts: 79
I have seen scenarios where people need the result from tables from two remote databases. If you use threads to execute queries, the speed is much faster than making one queries and then after it is done and you make another.
[ August 30, 2005: Message edited by: Jeremy Hsu ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Thread problem
 
Similar Threads
ejbCreate() throws CreateException
Regarding Thread in EJB
Two WAR files that have common jars to one EAR - Issue
Thread problem
EJB listening on a client socket for callbacks