This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is Spring JdbcTemplate expensive to create  RSS feed

 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!