File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Is Spring JdbcTemplate expensive to create Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Is Spring JdbcTemplate expensive to create" Watch "Is Spring JdbcTemplate expensive to create" New topic

Is Spring JdbcTemplate expensive to create

Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211


How expensive is it to create a JdbcTemplate object?
Would creating it at the start of every method be too expensive (I guess it would) ?

Rod recommends keeping it as an instance variable in the DAO's since it is thread safe. What is the recommendation if you need to make a JDBC call in a model object that loads the data directly from the DB?

And while we are talking about Spring, has anybody tried using Spring MVC to generate Client side validation JavaScript. I remember reading a post made by Matt Riable once about it, but it did not appear very straight forward.



The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Is Spring JdbcTemplate expensive to create
Similar Threads
Hibernate 3.0 Questions
Which framework would be the best ?
Using bind variables in Spring
DWR and JdbcTemplate
What else is Spring good for?