I haven't done this in a long time, and I only did it for BMP, but the method is the same for CMP.
You do it all in jboss.xml. Container configurations are defined as elements of the jboss tag. Here's a sample BMP custom configuration: | <container-configurations> | <container-configuration> | <container-name>Custom BMP EntityBean</container-name> | <call-logging>false</call-logging> | <invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name> | <sync-on-commit-only>false</sync-on-commit-only> | <insert-after-ejb-post-create>false</insert-after-ejb-post-create> | <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 metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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> | </container-interceptors> | | <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool> | <instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache> | <persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</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>10</min-capacity> | <!-- <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> | <!-- <MinimumSize>10</MinimumSize> --> | <!-- <MinimumSize>0</MinimumSize> --> | </container-pool-conf> | <commit-option>A</commit-option> | </container-configuration> | </container-configurations> | Also in jboss.xml, where you define your enterprise beans, you can optionally specify a custom configuration to use: | <entity> | <resource-ref> | <res-ref-name>jdbc/OSnetDataSource</res-ref-name> | <resource-name>OSnetDataSource</resource-name> | </resource-ref> | <ejb-name>OSnet_OrganizationEJB</ejb-name> | <jndi-name>OSnet/Organization</jndi-name> | <configuration-name>Custom BMP EntityBean</configuration-name> | </entity> | I actually did created this entity back in JBoss 2.4.0. I don't use BMP anymore. I was just experimenting with it so I could objectively contrast it to CMP; so the Organizations list on http://www.OpenStandards.net happens to still be in BMP today. Everything else is in CMP. You can copy default container configurations from server/default/conf/standardjboss.xml into your jboss.xml, rename it, and then customize it. Here is the standard CMP 2.x configuration from JBoss 3.2.3: | <container-configuration> | <container-name>Standard CMP 2.x EntityBean</container-name> | <call-logging>false</call-logging> | <invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name> | <sync-on-commit-only>false</sync-on-commit-only> | <insert-after-ejb-post-create>false</insert-after-ejb-post-create> | <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 metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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> | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836750#3836750 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836750 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user