1 Reply Latest reply on Oct 20, 2009 10:12 PM by Diego Y K

    Two Entity Managers issues

    Diego Y K Newbie

      Hi,


      In my application I've configured two Entity Manager on components.xml as follows.




           <persistence:entity-manager-factory
                name="entityManagerFactory" persistence-unit-name="managementPool"/>
      
           <persistence:managed-persistence-context
                name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}"/>
           
           
           <!-- Online Entity Manager -->
           
           <persistence:entity-manager-factory
                name="onlineEMFactory" persistence-unit-name="onlineBase"/>
      
           <persistence:managed-persistence-context
                name="onlineEM" auto-create="true" entity-manager-factory="#{onlineEMFactory}"/> 
                
           <!-- End Online Entity Manager -->
      
           <ui:jpa-entity-loader entity-manager="#{entityManager}" />
      
           <ui:jpa-entity-loader entity-manager="#{onlineEM}" />



      When I have select combo boxes on my screens I use the s:convertEntity tag to retrieve the value on the server side.


      Before I added the second entity manager everything was working just fine.


      But now, after the configuration of the second entity manager, when I submit the values I got an Unknow Entity error message.


      I was wondering if the use o s:convertEntity tag is possible only with one persistence unit.