Yes, I have just got the following working:
- I had to make a Stateful bean, a POJO
didi not seem to work.
package com.mydomain;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Startup;
@Scope(ScopeType.APPLICATION)
@Name("sbean2")
@Stateful
@Startup
public class SBean2 implements S2 {
@PersistenceContext
private EntityManager entityManager;
@Create
public void start() {
System.out.println("---------------------------");
System.out.println("-- --");
System.out.println("-- Starting sbean2 --");
System.out.println("-- --");
System.out.println("---------------------------");
System.out.println("entity manager is " + entityManager);
}
@Remove @Destroy
public void end() {
}
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000854#4000854
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000854
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user