
Untitled
By: a guest on
Aug 7th, 2011 | syntax:
None | size: 1.40 KB | views:
247 | expires: Never
@Stateful
@SessionScoped
@Named
public class Pinger {
@PersistenceContext(type = PersistenceContextType.EXTENDED)
private EntityManager entityManager;
@PostConstruct
public void init() {
entityManager.getDelegate();
}
public void ping() {
}
}
22:43:22,417 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/concept].[FacesServlet]] (http--127.0.0.1-8080-3) Servlet.service() for servlet FacesServlet threw exception: javax.ejb.EJBException: Found extended persistence context in SFSB invocation call stack but that cannot be used because the transaction already has a transactional context associated with it. This can be avoided by changing application code, either eliminate the extended persistence context or the transactional context. See JPA spec 2.0 section 7.6.3.1. Scoped persistence unit name=concept.war#primary, persistence context already in transaction =org.hibernate.ejb.EntityManagerImpl@3e151de3, extended persistence context =ExtendedEntityManager [concept.war#primary]
at org.jboss.as.jpa.container.ExtendedEntityManager.getEntityManager(ExtendedEntityManager.java:88) [jboss-as-jpa-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
at org.jboss.as.jpa.container.AbstractEntityManager.getDelegate(AbstractEntityManager.java:465) [jboss-as-jpa-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
at fi.nik.concept.Pinger.init(Pinger.java:20) [classes:]