Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 7th, 2011  |  syntax: None  |  size: 1.40 KB  |  views: 247  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. @Stateful
  2. @SessionScoped
  3. @Named
  4. public class Pinger {
  5.         @PersistenceContext(type = PersistenceContextType.EXTENDED)
  6.         private EntityManager entityManager;
  7.  
  8.         @PostConstruct
  9.         public void init() {
  10.                 entityManager.getDelegate();
  11.         }
  12.  
  13.         public void ping() {
  14.  
  15.         }
  16. }
  17.  
  18.  
  19. 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]
  20.         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]
  21.         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]
  22.         at fi.nik.concept.Pinger.init(Pinger.java:20) [classes:]
clone this paste RAW Paste Data