0 Replies Latest reply on Aug 20, 2013 2:11 PM by cproinger

    migrating jboss.xml to jboss7. what about read-only-methods and container-configuration?

    cproinger

      hello, my company is trying to migrate from jboss 6 to jboss 7 and we have 2 serious problems with ejb2.1 entity-beans that aren't mentioned in any migration guide.

       

      in jboss 7 the jboss.xml isn't recognized anymore so we would have to use jboss-ejb3.xml but that doesn't have the elements

       

      1) enterprise-beans/entity/method-attributes/method/*

       

      were you could set specific methods like "get*" and read-only = true. Without this i fear that every entity-method we call will trigger the invocation of ejbStore later on and write-lock the entity-bean. i fear performance- and locking-problems in that case.

       

      2) container-configurations/**

       

      were you could configure the instance-cache and container-interceptors, something like this for example

       


       

      <container-configuration extends="Standard Pessimistic BMP EntityBean">

           <container-name>Bigcache BMP EntityBean</container-name>

                  <container-interceptors>    

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

                      <interceptor>com.mycompany.jboss.ejb.plugins.MyLogInterceptor</interceptor>

                      <interceptor>org.jboss.ejb.plugins.security.PreSecurityInterceptor</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.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor</interceptor>

                   </container-interceptors>

       

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

                  <persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>

                  <container-cache-conf>

                      <cache-policy>

                          org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy

                      </cache-policy>

                      <cache-policy-conf>

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

                          <max-capacity>30000</max-capacity>

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

                          <max-bean-age>18000</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-configuration>

       

      the closest thing to an entity-instance-cache in jboss 7 is

      https://github.com/jbossas/jboss-as/blob/7.1.3.Final/ejb3/src/main/java/org/jboss/as/ejb3/component/entity/EntityBeanComponent.java

      and

      https://github.com/jbossas/jboss-as/tree/7.1.1.Final/ejb3/src/main/java/org/jboss/as/ejb3/component/entity/entitycache

       

      but i'm not sure if this is even the same thing or just a cache that is used to do the bean-locks or something.

       

      is there a way to configure this in jboss7 or does jboss7 definitly not support ejb2.1 to that degree?