-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: web site with a lot of connections
PostPosted: Thu Oct 02, 2003 8:56 am 
Beginner
Beginner

Joined: Thu Oct 02, 2003 8:02 am
Posts: 45
I write a web site. On this site, there will be a lot a user connected at a time? I use Hibernate OR mapping layer, and tomcat as Server.

What is the best way to manage such a lot of connections at a time ? Is there a pattern to resolve it? If yes, which is this pattern and how it works.

Thanks.


Top
 Profile  
 
 Post subject: Re: web site with a lot of connections
PostPosted: Thu Oct 02, 2003 10:45 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
There are a lot good ways, but I think cache is the best way.

BTW "user count" is not a good metric for web application ( "a lot of users" says nothing for me), It must be better to use "pages per sec." to test availability (You must not overuse http session for things like resource management).

flam70 wrote:
I write a web site. On this site, there will be a lot a user connected at a time? I use Hibernate OR mapping layer, and tomcat as Server.

What is the best way to manage such a lot of connections at a time ? Is there a pattern to resolve it? If yes, which is this pattern and how it works.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 02, 2003 10:50 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Use connection pooling and stateless design.

Connection polling allow you to limit the number of connection into your DB by taking then through a limited pool (10 cnx for example).
See the 2.4 section of hibernate reference guide for more information on connection pooling and hibernate.
See http://jakarta.apache.org/commons/dbcp/ for an alternative implementation

Stateless design
Do not store user specific data into Servlet Sessions (or limit this amount).
Do not let opened session into user servlet session: this will keep the DB connection opened.

You can find more information by googleing those terms. These are very general design strategies (not specific to hibernate)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.