• +91 9723535972
  • info@interviewmaterial.com

Spring Interview Questions and Answers

Question - How is it possible to use the Tomcat JNDI DataSource in the Spring applications?

Answer -

To use the servlet container which is configured in the JNDI (Java Naming and Directory Interface) DataSource, the DataSource bean has to be configured in the spring bean config file and then injected into the beans as dependencies. Post this, the DataSource bean can be used for performing database operations by means of the JdbcTemplate. The syntax for registering a MySQL DataSource bean:

  •    

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners