In this section, you will learn about Hibernate datasource configuration in Tomcat.
For Hibernate datasource configuration in Tomcat, you will need to take care the following things :
<resource-ref> <description>My DataSource</description> <res-ref-name>jdbc/primaryDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
<Resource name="jdbc/primaryDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="yourusername" password="yourpassword" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/yourdatabase"/>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: hibernate tomcat
Post your Comment