Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 18th, 2002, 10:09 AM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
Page BUffer

Hi,

Are there any disadvantages in using Page Buffering ??? and i would also like to know what are the main advantages of using Buffers??

tia,
gaucho

Reply With Quote
  #2  
Old October 18th, 2002, 12:52 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
What exactly do you mean? JSPs are already buffered, all you can do is play with the size of the buffer.

Reply With Quote
  #3  
Old October 21st, 2002, 05:04 AM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
ok.. heres the situation!

Our JSP application has connections to both Oracle and MySQL... In each page there are nearly a dozen queries executing on a MySQL db. at the begining of each page, a connection is opened and at the end they are close.. Ideally, if the user waits for the page to load completely and then hit the button Next or Cancel, the connection is freed..

But what happens often is that soon after entering the page, many users just click on Next resulting in the connection not getting closed...and soon, the no of connections exceed the allotted number (because they dont get freed automatically) and thus crashes the application..

the scripts are all wrapped with try, catch, finally blocks but to no avail...

I want to implement 2 more measures..

1. set a pageBuffer size such that the pafe is flushed only at the end of generating the entire page..
&

2. use a connection pool for all the databases (another issue where i need u guys help!)

thnx,
sands

Reply With Quote
  #4  
Old October 21st, 2002, 10:19 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
You change the page buffer in a page directive, like

<%@ page buffer="64k" %>

The default is 8k. You can also set autoFlush="false", but it will raise an exception if you overflow the buffer before flushing manually. Keep in mind that the jsp1.1 spec says that the buffer has to be flushed before executing a <jsp:include> tag. So if you have any of those, changing the buffer size isn't going to help.

Here's an article on connection pooling:
http://www.webdevelopersjournal.com...ction_pool.html

Reply With Quote
  #5  
Old October 21st, 2002, 12:13 PM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
hi,

thnx for the link.. hv u implemented it by any chance.. I am facing some trouble with it...

had earlier tried using the connection pool configuration provided on the tomcat´s site but that too didnt work out well..

thnx

Reply With Quote
  #6  
Old October 21st, 2002, 12:24 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Haven't worked with connection pools, sorry.

You might look into using tomcat to create the pool, though. I think 4.1 has a nice web interface to allow you to set one up.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Page BUffer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT