Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

where to use the connection  RSS feed

 
Abhijeet Gholkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I have a small query
Where is it recommended to open a connection object , at application level so that every body goes thru the same connection, session level so that the connection is valid for particular session or for every page.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your Connection Pool so a limited number of Connections can be shared throughout your webapp and the time to create Connections is removed from normal processing. Most servers easily support JNDI DataSource Pools. You can use the one provided by your server. If you are using an older server which doen't support JNDI, I recommend you try a pooling class like DbConnectionBroker from http://www.javaexchange.com
 
Srini Gogineni
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Carl Trusiak:
In your Connection Pool so a limited number of Connections can be shared throughout your webapp and the time to create Connections is removed from normal processing. Most servers easily support JNDI DataSource Pools. You can use the one provided by your server. If you are using an older server which doen't support JNDI, I recommend you try a pooling class like DbConnectionBroker from http://www.javaexchange.com

Hi,
set the java bean propery as request
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!