What is the use of DataSourceTransactionManager And JndiObjectFactoryBean And JdbcTemplate?
<p>What is the Use of below :</p>

<pre><code>org.springframework.jdbc.core.JdbcTemplate
org.springframework.jdbc.datasource.DataSourceTransactionManager
org.springframework.jndi.JndiObjectFactoryBean
&lt;tx:annotation-driven proxy-target-class="true" transaction-manager="transactionManager" /&gt;
</code></pre>

<p>what is the use of above Classes , I am new to spring, i want to know which purposes we are using above classes</p>

<p>below is my code:-</p>

<pre><code>&lt;bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"&gt;
&lt;property name="exceptionMappings"&gt;
    &lt;props&gt;
        &lt;prop key="java.lang.Exception"&gt;Error&lt;/prop&gt;
    &lt;/props&gt;&lt;/property&gt;&lt;/bean&gt;
&lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; 

    &lt;property name="prefix"&gt;
        &lt;value&gt;/WEB-INF/jsp/&lt;/value&gt;
    &lt;/property&gt;
    &lt;property name="suffix"&gt;
        &lt;value&gt;.jsp&lt;/value&gt;
    &lt;/property&gt;
&lt;/bean&gt; 

 &lt;bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"&gt;
    &lt;property name="dataSource" ref="dataSource" /&gt;&lt;/bean&gt;
  &lt;bean id="transactionManager"
  class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
  scope="singleton"&gt;
  &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
 &lt;tx:annotation-driven proxy-target-class="true" transaction-manager="transactionManager" /&gt;
  &lt;bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
  &lt;property name="jndiName" value="java:comp/env/jdbc/DbDataSource"/&gt;
  &lt;property name="lookupOnStartup" value="true"/&gt;
  &lt;property name="proxyInterface" value="javax.sql.DataSource"/&gt;&lt;/bean&gt;
  &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;      
&lt;/bean&gt;
</code></pre>