0 Replies Latest reply on Apr 10, 2009 9:20 AM by Francis Drake

    Can't set entity-transaction

    Francis Drake Newbie
      hi,

        I am trying to set transactions via entity-manager, but after adding:

      `
      <transaction:entity-transaction transaction entity-manager="#{entityManager}"/>
      `

      (tried '#{entityManager}' and 'entityManager')

      I can't open any page of the project. Simply it tries to redirect to debug.seam but never finishes. All the time I got 'loading page' in browser status and the jboss is logging those standard messages in the infinite loop:


      08:53:00,515 ERROR [STDERR] 2009-04-10 08:53:00 com.sun.facelets.compiler.TagLib
      raryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss4seam/server/default/deploy/Betting.
      ear/Betting.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
      08:53:00,515 ERROR [STDERR] 2009-04-10 08:53:00 com.sun.facelets.compiler.TagLib
      raryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss4seam/server/default/deploy/Betting.
      ear/Betting.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
      08:53:00,515 ERROR [STDERR] 2009-04-10 08:53:00 com.sun.facelets.compiler.TagLib
      raryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss4seam/server/default/deploy/Betting.
      ear/Betting.war/WEB-INF/lib/jboss-seam-rss.jar!/META-INF/seam-rss.taglib.xml
      08:53:00,515 ERROR [STDERR] 2009-04-10 08:53:00 com.sun.facelets.compiler.TagLib
      raryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss4seam/server/default/deploy/Betting.
      ear/Betting.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml



      Then I switch to ejb-transaction and is fine.

      My components.xml:

      `
      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:transaction="http://jboss.com/products/seam/transaction"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:persistence="http://jboss.com/products/seam/persistence"
                  xmlns:drools="http://jboss.com/products/seam/drools"
                  xmlns:bpm="http://jboss.com/products/seam/bpm"
                  xmlns:security="http://jboss.com/products/seam/security"
                  xmlns:mail="http://jboss.com/products/seam/mail"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"           
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">

      ...


      <transaction:entity-transaction entity-manager="#{entityManager}"/>

      <persistence:managed-persistence-context name="entityManager"
                                           auto-create="true"                     
                            persistence-unit-jndi-name="MyPUManagerFactory"/>

      ...

      `


      Is it because I use "JTA" transactions type in my persistence unit? Anyways, why Seam doesn't show what the problem is... :/