1 Reply Latest reply on Feb 4, 2009 11:22 AM by alrubinger

    JPA deployers in jboss-ejb3-embedded

    jaikiran

      jboss-ejb3-embedded uses its own copy of jpa-deployers-beans.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
       <bean name="DataSourceDependencyResolver" class="org.jboss.ejb3.embedded.resolvers.EmbeddedDataSourceDependencyResolver"/>
      
       <bean name="JavaEEModuleInformer" class="org.jboss.ejb3.embedded.javaee.SimpleJavaEEModuleInformer"/>
      
       <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DefaultPersistenceUnitDependencyResolver"/>
      
       <bean name="PersistenceParsingDeployer" class="org.jboss.jpa.deployers.PersistenceParsingDeployer"/>
      
       <bean name="PersistenceDeployer" class="org.jboss.jpa.deployers.PersistenceDeployer"/>
       <bean name="PersistenceUnitDeployer" class="org.jboss.jpa.deployers.PersistenceUnitDeployer">
       <property name="defaultPersistenceProperties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
       <entry>
       <key>hibernate.transaction.manager_lookup_class</key>
       <value>org.hibernate.transaction.JBossTransactionManagerLookup</value>
       </entry>
       </map>
       </property>
       </bean>
      </deployment>


      While working on https://jira.jboss.org/jira/browse/EJBTHREE-1716 i had to upgrade the version of jboss-ejb3-core to 1.0.0 in the pom.xml dependency of embedded. This version of ejb3-core expects the PersistenceUnitDependencyResolver to have a search strategy and has various different impls. The ejb3-core by default uses:
      <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DynamicPersistenceUnitDependencyResolver"/>


      Which one do we want to use in the ejb3-embedded? Right now i have let it remain at
      DefaultPersistenceUnitDependencyResolver with a SpecCompliantSearchStrategy:

      <bean name="SpecCompliantSearchStrategy" class="org.jboss.jpa.resolvers.strategy.SpecCompliantSearchStrategy"/>
      
       <!-- DefaultPersistenceUnitDependencyResolver for spec compliant resolving. Uses SpecCompliantSearchStrategy-->
       <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DefaultPersistenceUnitDependencyResolver"/>
      


      Is this OK? Or should ejb3-embedded too use the dynamic resolver?