Results 1 to 3 of 3

Thread: SimpleJdbcCall

  1. #1

    Default SimpleJdbcCall

    A SimpleJdbcCall can be instantiated using a dataSource in the constructor

    SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(DataSource datasource)

    The example of usage from the Spring Framework Documentation also instantiates a new SimpleJdbcTemplate with the same datasource.

    I don't see anywhere where the template is used. Does the SimpleJdbcCall work independently of the template?

  2. #2
    Join Date
    Aug 2004
    Posts
    1,104

    Default

    SimpleJdbcCall uses a JdbcTemplate internally. If you pass in a DataSource in the constructor it will create a new instance of a JdbcTemplate to use. If you pass in a pre-configured JdbcTemplate then it will use that instead.

    The JdbcTemplate is used in the methods compileInternal and executeCallInternal via the getJdbcTemplate() method.
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

  3. #3

    Default

    Thanks Trisberg. I'm new to Spring and really appreciate your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •