ITeye博客

hailongshih的博客

hailongshih · 共 3 篇文章

事务隔离和传播

Spring中事务的Propagation(传播性)的取值 -- PROPAGATION_REQUIRED -- 加入当前已有事务;只有当前没有事务才起一个新的事务 比如说,ServiceB.methodB的事务级别定义为PROPAGATION_REQUIRED, 那么由于ServiceA.methodA的时候,ServiceA.methodA已经起了事务,这时调用ServiceB.methodB,ServiceB.methodB看到自己已经运行在ServiceA.methodA的事务内部,就不再起新的事务。而假如ServiceA.methodA运行的时候发现自己没有在事务中,它就会为自己分…

2014-03-18 18:21 · 评论(0)

Java发送邮件

package com.localhotel.mail; import java.util.Date; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.NoSuchProviderException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import jav…

2014-01-07 14:15 · 评论(0)

doAction()和window.location.href的冲突

今早调查一个bug,就是添加页面确认有时候数据成功添加有时候失败,仔细看看代码没啥问题;$("#btnSubmit").click(function() { $("input").val(oprFlagAdd); //如果表单验证通过,则提交表单 if(validator.form()){ $("#myStartTime").val($("#startTime").val()); $("#myEndTime").val($("#endTime").val()); $("#shiftNum").val($("#shiftNum1").val()); if($("#myStartTime").v…

2013-07-16 11:29 · 评论(0)