-
session closed or session is null0
package com.ins.dao.impl;
import java.util.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.ins.beans.Menu;
import com.ins.dao.MenuDao;
import com.ins.pojo.TMenu;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository("menuDao")
@Transactional
@SuppressWarnings("rawtypes")
public class MenuDaoImpl extends BaseDaoImpl<TMenu> implements MenuDao
{
private BaseDaoImpl menuDao;
public BaseDaoImpl getMenuDao()
{
return menuDao;
}
@Autowired
public void setMenuDao(BaseDaoImpl menuDao)
{
this.menuDao = menuDao;
}
public MenuDaoImpl(){}
public MenuDaoImpl(String HQL_LIST_ALL, String HQL_COUNT_ALL)
{
super(HQL_LIST_ALL, HQL_COUNT_ALL);
}
@Override
public List<Menu> getTree() throws Exception
{
List<TMenu> tmenu = menuDao.findByHql("from TMenu t where t.TMenu is null");
List<Menu> menu = new ArrayList<Menu>();
if(tmenu !=null && tmenu.size()>0)
{
for(TMenu t:tmenu)
{
Menu m = new Menu();
BeanUtils.copyProperties(t, m);
Set<TMenu> set = t.getTMenus();//提示session关闭
if(set !=null && !set.isEmpty())
{
m.setState("closed");
}
else
{
m.setState("open");
}
menu.add(m);
}
}
return menu;
}
}2014年6月13日 21:37
目前还没有答案
相关推荐
This specification is intended to be an open standard, and as such the text and information contained herein may be freely used, copied, or distributed without compensation or licensing restrictions. ...
Resolved issue 1497: GetLog fails when the current window is closed [['OS-All', 'Pri-0']] Resolved issue 1495: ChromeDriver crashes with "Check failed: !page_load_strategy_.empty()" [['OS-All', 'Pri-0...
Not-null property references a null or transient value 当Hibernate尝试保存一个实体时,如果该实体中的某个被标记为`@NotNull`或在映射文件中定义为`not-null="true"`的属性值为null或者指向一个尚未持久化的...
if (channel.isClosed()) { System.out.println("exit-status: " + channel.getExitStatus()); break; } try { Thread.sleep(1000); } catch (Exception ee) { } } channel.disconnect(); session....
To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...
if (channel.isClosed()) { System.out.println("exit-status: " + channel.getExitStatus()); break; } try { Thread.sleep(1000); } catch (Exception ee) { } } channel.disconnect(); session....
if (channel.isClosed()) { System.out.println("exit-status: " + channel.getExitStatus()); break; } try { Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } } channel....
2. **Hibernate的session问题**: "no session or session was closed"提示可能是因为在Hibernate配置文件中,外键的lazy属性设置为"true"。若需要立即加载关联对象,应将其改为"false"。 3. **Struts的checkbox使用...
if (channel.isClosed()) { System.out.println("exit-status: " + channel.getExitStatus()); break; } try { Thread.sleep(1000); } catch (Exception ee) { } } // 关闭资源 inputstream.close(); ...
- `isClosed()`: 检查 `Session` 是否已关闭。 在 JSP 中使用 Hibernate,开发者可以利用这些函数进行数据库操作,减少与数据库的直接交互,提高代码的可维护性和性能。例如,通过 `Session` 的各种方法处理对象的...
// Remove the given callback for `event` or all // registered callbacks. WildEmitter.prototype.off = function (event, fn) { var callbacks = this.callbacks[event], i; if (!callbacks) return this; ...
if (channel.isClosed()) { System.out.println("退出"); break; } try { Thread.sleep(1000); } catch (Exception ee) { } } channel.disconnect(); session.disconnect(); } } ``` 以上代码仅作为...
* When using RefreshRecord on a Memo or Blobfield and the field has been modified by another user, the blobsize of that field does not change if it is less than before (Quality Central 4676).* ...
- `readyState`:表示WebSocket的状态,值为0(CONNECTING)、1(OPEN)、2(CLOSING)、3(CLOSED)。 - `bufferedAmount`:表示尚未发送到网络的字节数。 - `onopen`:连接成功时触发的事件处理函数。 - `onerror`...
// If current element is smaller than the pivot if (arr[j] ) { i++; // swap arr[i] and arr[j] int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } // swap arr[i+1] and arr[high] (or ...
如果需要在服务器端处理子窗口的返回值,那么可以考虑使用查询字符串或者存储在session中的方式,但这需要更复杂的逻辑,因为ASP页面的执行是在服务器端,而JavaScript是在客户端。 总的来说,"asp获取子窗体返回值...