Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Spring JdbcTemplate expensive to create

 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

thanks

Sonny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic