[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2580) JPA-Session handling and Session Beans with scope=SESSION
Cyrill Rᅢᄐttimann (JIRA)
jira-events at lists.jboss.org
Mon Feb 4 13:45:04 EST 2008
JPA-Session handling and Session Beans with scope=SESSION
---------------------------------------------------------
Key: JBSEAM-2580
URL: http://jira.jboss.com/jira/browse/JBSEAM-2580
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.1.GA
Environment: MacOS X 10.5, Java 5 (Apple), Glassfish v2u1
Reporter: Cyrill Rᅢᄐttimann
Priority: Blocker
I have two session beans with scope=SESSION, the CustomerManager and the SportEquipmentManager. While accessing the sport equipments of a customer, I get a org.hibernate.LazyInitializationException at the method allSportEquipments():
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: yy.ddd.ttt.customer.domain.Customer.sportEquipments, no session or session was closed
@In(value = SeamConstants.NAME_ENTITYMANAGER)
private EntityManager mEntityManager;
@DataModel(value = "sportequipments")
private Set<SportEquipment> mSportEquipments;
@In(value = "customerManager", create = true)
private CustomerManager mCustomerManager;
private SportEquipmentType mCurrentSportEquipmentType;
@Factory("sportequipments")
public void allSportEquipments() throws PersistencyException {
final Customer customer = mCustomerManager.getCustomer();
mSportEquipments = customer.getSportEquipments();
}
The interesting thing is that this happens only, if I am accessing the SportEquipmentManager after using the CustomerManager. If I am acessing the SportEquipmentManager directly, I am not hit with the exception. Using the CustomerManger means, opening a page with access to the CustomerManager's method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list