mysql,spring+ibatis事务机制问题
先看异常:
org.springframework.dao.CannotAcquireLockException: SqlMapClient operation;
...
...
...
CannotAcquireLockException: SqlMapClient operation
...
...
...
spring的配置
XML code:
<!-- ****************事务通知(事务增强)**************** -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- 添加事务切面 -->
<aop:config>
<!--切点表达式-->
<aop:pointcut id="bizMethods"
expression="execution(* com.jw.xzms.*.biz.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<!-- 事务属性定义 -->
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<!-- action -->
java代码
Java code
Code highlighting produced by Actipro CodeHighlighter (freeware
相关问答:
MySql中插入当前时间的该怎么写啊?
now()
SQL code:
sql里是:
getdate()
引用
now()
学习
SQL code:
select now();
SQL code:
TODAY()
?
SQL code:
select now();
/* ......
假如数据库中有个test表,表中有id,Name,num,记录时间
id为自增长主键,name是名字,num表示其数量
1 nike 100 系统时间
2 nike 300 &n ......
我有一个java环境下的程序,在本机运行正常,但发布到网的虚拟主机时不能连接数据库连接池
jdk 1.6 tomcat6.0.18 mysql5 mysqljdbc5.1.5
虚拟主机的技术人员说,只能配置局域的数据库连接池,也就是在M ......
在安装Java编译器的Eclipse的时候,对环境变量进行了配置,在安装MySQl的时候也要对环境变量进行配置;那么后面的配置会影响前面的Eclipse的配置吗?
请大家多指教~!谢谢!
不会把,我这都装了的 我系统里 还装了 ......
有一条sql语句 select a.name ,b.name from tableA a,tableB b where a.id = b.id and 。。。(其他过滤条件)
其中a.id 为tableA主键 有唯一性索引 数据量才1千多
b.id 为日志表tableB 的外键 ,慢去条件的才 ......