当前位置: 代码迷 >> Java Web开发 >> entityDao.getJdbcTemplate().execute(sql) 的有关问题?
  详细解决方案

entityDao.getJdbcTemplate().execute(sql) 的有关问题?

热度:783   发布时间:2016-04-17 01:14:05.0
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);
时就像卡住了,不再往下执行了。
请问这是什么原因啊?????????????????????

------解决方案--------------------
有没有报错?
  相关解决方案