• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

single threaded or multi threaded

 
Ranch Hand
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JEE application
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic