File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

single threaded or multi threaded

 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I know an application(JEE or Stanalone or any java application) is single threaded or multi threaded?.How a multithreaded application behaves? ,How singlethreaded application behaves?.All JEE application are multithreaded?,all stanalone applcation are single threaded?
Please excuse if this question is silly,
[ September 26, 2008: Message edited by: jacob deiter ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How can I know an application(JEE or Stanalone or any java application) is single threaded or multi threaded?.

If you wrote it you'll know . JEE application may be multithreaded - indeed its very likely to be, or what's the point.


How a multithreaded application behaves?

It does things concurrently.


,How singlethreaded application behaves?.

It does things sequentially.


All JEE application are multithreaded?,

Not necessarilly. You could write a JEE app so it is effectively sequential, but why bother?


all stanalone applcation are single threaded?

No.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an aside, even if the the code of an application is not explicitly multi-threaded, the JVM has always a number of threads active. For example, garbage collection runs as a background thread.
 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does things concurrently

for an example,I deployed a simple POJO that retrieve value from database,layers are service layer(POJO),DAO Layer. if many user access the POJO at the same time then what will happen Subsequently,How the server serve the many users?.If the server do mutithreading means the entire things (service layer-pojo and DAO) is threaded ?
[ September 28, 2008: Message edited by: jacob deiter ]
 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jacob deiter:

for an example,I deployed a simple POJO that retrieve value from database(service layer-POJO,DAO). if many user access the POJO at the same time then what will happen Subsequently,How the server serve the many users?.If the server do mutithreading means the entire things (service layer-pojo and DAO) is threaded ?


What is the context you are talking about? A client application you wrote? A JEE application?
 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JEE application
 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jacob deiter:
JEE application


Typically the JEE application will be multi-threaded. That means you should make sure your POJO and DAO (and all your other code) are thread-safe or accessed in a thread-safe manner.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic