Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
- <property name="defaultTimeout" value="400" />
- </bean>
- int timeout = determineTimeout(definition);
- if (timeout != -1) {
- txObject.getConnectionHolder().setTimeoutInSeconds(timeout);
- }
- public void setTimeoutInSeconds(int seconds) {
- setTimeoutInMillis(seconds * 1000);
- public void setTimeoutInMillis(long millis) {
- this.deadline = new Date(System.currentTimeMillis() + millis);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement