title: thread safe, stateless design using Spring
body: <p>I have assumed that if instance variables are managed by spring IOC, and are singletons that the desgin can be called stateless and threadsafe.This type of desgin could consequently be scaled to clustered servers. Am I correct in my assumptions,outlined below ?</p>
  
  <pre><code>@Repository("myDao")
  public class MyDao implements Dao {
  
      @Autowired
      private JdbcTemplate jdbcTemplate;
  
      @Value("${sqlFoo}")
      private String foo;
  
      @Override
      public Integer getMyInt(String str) {
        return jdbcTemplate.queryForInt(foo, str);
      }
  </code></pre>
  
  <p>which is then injected into :</p>
  
  <pre><code>@Service("myService")
  public class MyServiceImpl {
  
      @Resource(name = "myDao")
      Dao dao;
  
      @Override
      @Transactional(readOnly = true)
      public int getScore(String str) {
        return dao.getMyInt(str);
      }
  }
  </code></pre>