java - Configure spring datasource for hibernate and @Transactional -


at moment i'm using drivermanagerdatasource @transactional annotation manage transactions. transactions very slow, because data source open , close connection db each time.

what data source should use speed transaction?

drivermanagerdatasource isn't connection pool , should used testing. should try basicdatasource apache commons dbcp. like:

<bean id="datasource" destroy-method="close"      class="org.apache.commons.dbcp.basicdatasource">     <property name="driverclassname" value="${jdbc.driverclassname}"/>     <property name="url" value="${jdbc.url}"/>     <property name="username" value="${jdbc.username}"/>     <property name="password" value="${jdbc.password}"/> </bean> 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -