救命啊
//dao方法
public TbNews getByIdNes(TbNews news){ //根据id查询新闻
        System.out.println("UnsychoDao");
        try{
            String hql = "from TbNews where newsid = ?" ;
            TbNews temp = (TbNews)this.getSession().createQuery(hql)
            .setParameter(0,news.getNewsid()).uniqueResult() ;
            if(temp != null)
            return temp ;
        }catch(Exception e){
            e.printStackTrace() ;
        }
        finally{
            if(this.getSession() != null){
                if(this.getSession().isOpen()){
                    this.getSession().flush() ;
                    this.getSession().clear() ;
                    this.getSession().close() ;
                }
            }
        }
           
        return null ;
    }  <!--dwr文件 -->
<dwr>  <allow>
    
    <create creator="spring" javascript="UnsychoDao" > 
    <param name="beanName" value="UnsychoDao" /> 
   </create>
    <convert converter="bean" match="xf.dragon.pojo.*"></convert>
  </allow>
</dwr>
<!--spring文件 -->
<bean name="UnsychoDao" class="xf.dragon.util_dao.UnsychoDao">
        <property name="sessionFactory" ref="SessionFactory"></property>
    </bean>               
 <!--标签引入 -->
<script type='text/javascript' src='/Stelmeg/dwr/interface/UnsychoDao.js'></script>
<script type='text/javascript' src='/Stelmeg/dwr/engine.js'></script>
<script type='text/javascript' src='/Stelmeg/dwr/util.js'></script>
<!--方法调用 -->
function HandelIdNews(newsid){
   var myObj = new Object() ; //实例化对象
   myObj.newsid=newsid ; // 参数传入
   UnsychoDao.getByIdNes(myObj,callBack2) ;
   function callBack2(data){ //回调函数
   mynewsTitle.innerHTML=data.newsname; 
   mynewsContent.innerHTML=data.newscontent;
   }
}
功能为点击图片显示图片信息,无刷新,但是为什么点击了几次之后就没有反应了。
在dao方法中打印语句也打印了,只有重启Tomcat5后才能有反应,然后控制台继续显示
上次堆积的输出语句,然后重复问题.
用的Oracle 10g SSH+DWR