Hi,
 I am trying to add a page in my demo application for that my bean contains

  | @Entity
  | @Scope(SESSION)
  | @Name("myPage")
  | @Table(name="my_page")
  | public class MyPage implements Serializable {
  |     
  | @Id @GeneratedValue
  | @Column(name="page_id")
  | private Integer pageId;
  | 
and 
@Stateful
  | @Scope(ScopeType.CONVERSATION)
  | @Name("surveyManager")
  | public class PageAction implements PageManager {
  | 
  | @In(required=true) 
  | @Out(required=true)
  | private MyPage myPage;
  | @In(create=true)
  | private EntityManager em;   
  | .......
  | 
  | 
and to add page i am using

  | public String add(MyPage myPage) {
  | try {
  | em.persist(myPage);
  | em.flush();
  | }catch (Exception ex){ }
  | }

When I try to add first page it works fine but when I try to add another page 
It gives error because of session object it brings old pageId and not the new 
one I also tried it by making @Stateless but still it wont work, but I need the 
session should remain and pageId should be new.
Is it possible??
Any hints???

Thanks
panky_p

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099739#4099739

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099739
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to