This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling multiple simultaneous users in a J2EE web application  RSS feed

 
pag mah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn how to develop real time j2ee web applications. All other parts of the architecture are clear to me except for one thing. How does such an application (say for example an airline ticket booking system) handle multiple simultaneous users, so that they don’t interfere with each other?

I tried to do some research but I got different answers from different sources such as:

• The database provides locking and transaction mechanisms so that the multiple users don’t interfere with each other.
• The servlet container handles the multiple requests appropriately.
• Synchronization needs to be done in the application java code.
• The EJB containers or application servers like WebSphere etc or frameworks like Spring take care of the concurrency.
etc etc.

So I am very confused about which is the actual correct answer.

I realize that the correct answer will depend on the exact requirement, architecture, business process, etc. But right now I just want to generally understand how the issue of multiple simultaneous users is typically handled by a J2EE application.

Any help will be greatly appreciated.
 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A J2ee application can logically be split into 3 parts. There is a Web application part, there is a middle business logic part and there is a database/data access part. In each of the parts, the handling of users varies.
You need to take a look at Threads in java. Immaterial of which part you are looking at a J2EE application, threads play a major role in handling users.

You can have one thread/user, have multiple users per thread, multiple threads/user. It all depends on what part you are in and what are the responsibility of the part.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!