persistence@glassfish.java.net

[forum question] Query sent to unactivated unitofwork

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Wed, 18 Oct 2006 08:47:02 -0400

Hi,

Could someone look into this problem?

http://gceclub.sun.com.cn/NASApp/sme/jive/thread.jsp?forum=22&thread=40971


I've asked the user to post source code and descriptors. The original
posts are in Chinese. I've translated the relevant part in English below:

He's using NetBeans 5.5 beta, SJSAS PE 9.0. Have a stateful session
bean invoking entities. The data has been saved to database, but the
stateful bean couldn't view the data thru entity operation. After
restarting the server, the stateful bean was able to view the data.

OneToMany(mappedBy = "gsid",cascade=CascadeType.ALL,fetch=FetchType.EAGER)

Is it related to fetch=FetchType.EAGER?

When he set fatch-type to LAZY, he saw this error: Query sent to
unactivated unitofwork. Once he changed it to EAGER, the stateful bean
can't view the data.

----------------

Thanks,

Cheng