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自带的C API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("数据库连接失败") ......
假如数据库中有个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 ......
我以前安装了一次,后来卸载了,现在再安装的时候,提示错误:Error 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
可是我找 ......
有一条sql语句 select a.name ,b.name from tableA a,tableB b where a.id = b.id and 。。。(其他过滤条件)
其中a.id 为tableA主键 有唯一性索引 数据量才1千多
b.id 为日志表tableB 的外键 ,慢去条件的才 ......