• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts and connectionPool

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,
I am building a webapp on top of struts. I also have a DBConnectionPool class that will handle getting MySQL database connection. I just want to ask your opinion on what I am doing has any flaw:
1. Extended ActionServlet and override init(...) method. In the init() I initialized conncetionpool and servletContext.setAttribute("dbpool", dbconn);
2. In the action class (for instance RegisterAction), I get the connectionpool like this. getServlet().getServletContext().getAttribute("dbpool");
I didn't get any problem having me as only user. Does anyone see flaws in my logic above? Do you have any better idea how to utilize generic connection pool with struts?
Thanks in advance for you kind replies.
 
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
there is a (development release) of JDBC3.0 driver for mySQL available.
see
sun jdbc im not sure if all the drivers include the pooling facility. best thing is to check with the mySQL homepage.
k
 
It's exactly the same and completely different as this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic