[jboss-user] [JBoss Seam] - Exception: No session or session closed
damatrix
do-not-reply at jboss.com
Thu Sep 27 06:04:17 EDT 2007
I'm using JBoss 4.2.1.GA and Seam 2.0 CR1. I have an SFSB as follows
| */
| @Stateful
| @Name(value = "fairListing")
| @Scope(ScopeType.SESSION)
| public class FairListBean implements FairListLocal {
|
| @In
| EntityManager entityManager;
|
| @In
| FacesMessages facesMessages;
|
| @DataModel
| private List<FairDTO> fairs;
|
| @DataModelSelection("fairs")
| private FairDTO fair;
|
| @Factory("fairs")
| public void list(){
| fairs = new FairQM(entityManager).findAll();
| }
|
| public void showDetails(){
| this.fair = entityManager.merge(fair);
| }
| }
|
I'm using this to manage a Master-Detail page showing a dataTable of fairs. when a fair is selected, the showDetails() action is called and the details of a fair are shown below the dataTable using an <a:outputPanel>.
I read that using the ManagedPersistenceContext configured in components.xml and injected in your code does not throw LazyInitializationException (hope i got that right :-) ). I was quite surprised to find this exception being thrown.
Can anyone point out what i'm doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089236#4089236
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089236
More information about the jboss-user
mailing list