0 Replies Latest reply on Sep 17, 2012 11:10 AM by Christian Inzko

    Migrate Configuration for EJB 2.x Entitybeans

    Christian Inzko Newbie

      We are using EJB 2.x Entitybeans in our application running on JBoss 4.0.5 and they have some default configurations in the files standardjboss.xml and standardjbosscmp-jdbc.xml, e.g.

       

      in standardjboss.xml:

      {code:xml}

            <container-configuration>

               <container-name>Standard CMP 2.x EntityBean</container-name>

               <sync-on-commit-only>false</sync-on-commit-only>

               <insert-after-ejb-post-create>false</insert-after-ejb-post-create>

               <call-ejb-store-on-clean>true</call-ejb-store-on-clean>

               <container-interceptors>

                  <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>

                  <interceptor>org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.EntityCreationInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.EntityReentranceInterceptor</interceptor>

                  <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.EntitySynchronizationInterceptor</interceptor>

                  <interceptor>org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor</interceptor>

               </container-interceptors>

               <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>

               <instance-cache>org.jboss.ejb.plugins.InvalidableEntityInstanceCache</instance-cache>

               <persistence-manager>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager</persistence-manager>

               <locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>

               <container-cache-conf>

                  <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>

                  <cache-policy-conf>

                     <min-capacity>50</min-capacity>

                     <max-capacity>1000000</max-capacity>

                     <overager-period>300</overager-period>

                     <max-bean-age>600</max-bean-age>

                     <resizer-period>400</resizer-period>

                     <max-cache-miss-period>60</max-cache-miss-period>

                     <min-cache-miss-period>1</min-cache-miss-period>

                     <cache-load-factor>0.75</cache-load-factor>

                  </cache-policy-conf>

               </container-cache-conf>

               <container-pool-conf>

                  <MaximumSize>100</MaximumSize>

               </container-pool-conf>

               <commit-option>B</commit-option>

            </container-configuration>

      {code}

       

      in standardjbosscmp-jdbc.xml:

      {code:xml}

         <defaults>

            <read-only>false</read-only>

            <read-time-out>300000</read-time-out>

            <row-locking>false</row-locking>

            <pk-constraint>true</pk-constraint>

            <throw-runtime-exceptions>false</throw-runtime-exceptions>

         </defaults>

      {code}

       

      I checked several online documentations and migration manuals but i didn't find a description if such a configuration is still possible in jboss 7.1.  If it is possible, it must be somewhere in standalone-full.xml but i did not find matching elements in the provided schema-files. I know, that some configuration settings can also be defined in the jbosscmp-jdbc.xml files which are contained in the META-INF directories of the ejb-jars but our application  has a lot of ejb-jars and i dont want to duplicate those applicationwide settings for each ejb-jar.

       

      Is there an easier way for such applicationwide configuration?