My EntityManager is injected to my session scoped and I have 3 methods:
| @PersistenceContext(type = EXTENDED)
| private EntityManager em;
|
| public String list(){
| ...
| }
|
| public String edit(){
| ...
| }
|
| public String save(){
| ...
| }
|
In list method, I retrieve a collection of data from db. in edit(), I start to
edit for a single entity. in save(), when I try to use em.persist(myentity) or
em.merge(myentity). I get java.lang.IllegalArgumentException: Entity not
managed.
If I change my ejb to conversation scoped, the problem would disappear. Any
idea?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007218#4007218
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007218
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user