Hi,
is there a reason why the method getJdbcTemplate in the class JdbcDaoSupport is made public and not protected? I thought the purpose of the method getJdbcTemplate is to provide a JdbcTemplate to DAO subclasses. For that purpose protected would be sufficient. But by making this method public all clients using the DAO subclass can access the JdbcTemplate by calling getJdbcTemplate and make database calls bypassing the DAO layer.
So would`t it be a better design to make the method protected in JdbcDaoSupport to prevent such usages?
Thanx for your replies.


Reply With Quote