读书人

entityDao.getJdbcTemplate().execute

发布时间: 2011-12-15 23:41:24 作者: rapoo

entityDao.getJdbcTemplate().execute(sql) 的问题??????
我的项目用了SPRING框架,使用了SPRING的dataSource来进行数据库操作,
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>${jndiName}</value>
</property>
</bean>
因为项目是部署在WEBLOGIC上的,所以使用了JNDI。

然后我写了一个方法
public int aaa(){
entityDao.getJdbcTemplate().execute(sql);
entityDao.getJdbcTemplate().execute(sql);
entityDao.getJdbcTemplate().execute(sql);
entityDao.getJdbcTemplate().execute(sql);
......
}
这当中要使用到20次这样的操作向数据库添加记录。

这个项目及方法在本机上调试成功。
但部署到WEBLOGIC上后,它执行到某一次entityDao.getJdbcTemplate().execute(sql);
时就像卡住了,不再往下执行了。
请问这是什么原因啊?????????????????????

[解决办法]
有没有报错?

读书人网 >Java Web开发

热点推荐