[JBoss-user] [Persistence CMP/JBoss] - Re: Configuring JBoss CMP for a caching enviroment

2004-05-28 Thread erik777
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-nameCustom BMP EntityBean/container-name
  |   call-loggingfalse/call-logging
  |   
invoker-proxy-binding-nameentity-rmi-invoker/invoker-proxy-binding-name
  |   sync-on-commit-onlyfalse/sync-on-commit-only
  |   insert-after-ejb-post-createfalse/insert-after-ejb-post-create
  |   container-interceptors
  | 
interceptororg.jboss.ejb.plugins.ProxyFactoryFinderInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.LogInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.SecurityInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.TxInterceptorCMT/interceptor
  | interceptor 
metricsEnabled=trueorg.jboss.ejb.plugins.MetricsInterceptor/interceptor
  | 
interceptororg.jboss.ejb.plugins.EntityCreationInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.EntityLockInterceptor/interceptor
  | 
interceptororg.jboss.ejb.plugins.EntityInstanceInterceptor/interceptor
  | 
interceptororg.jboss.ejb.plugins.EntityReentranceInterceptor/interceptor
  | 
interceptororg.jboss.resource.connectionmanager.CachedConnectionInterceptor/interceptor
  | 
interceptororg.jboss.ejb.plugins.EntitySynchronizationInterceptor/interceptor
  |   /container-interceptors
  | 
  |   instance-poolorg.jboss.ejb.plugins.EntityInstancePool/instance-pool
  |   
instance-cacheorg.jboss.ejb.plugins.EntityInstanceCache/instance-cache
  |   
persistence-managerorg.jboss.ejb.plugins.BMPPersistenceManager/persistence-manager
  |   
locking-policyorg.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock/locking-policy
  |
  |  container-cache-conf
  | 
cache-policyorg.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy/cache-policy
  | cache-policy-conf
  |min-capacity10/min-capacity
  | !--min-capacity50/min-capacity  --
  |max-capacity100/max-capacity
  |overager-period300/overager-period
  |max-bean-age600/max-bean-age
  |resizer-period400/resizer-period
  |max-cache-miss-period60/max-cache-miss-period
  |min-cache-miss-period1/min-cache-miss-period
  |cache-load-factor0.75/cache-load-factor
  | /cache-policy-conf
  |  /container-cache-conf
  |  
  |   container-pool-conf
  |   MaximumSize100/MaximumSize
  | !--  MinimumSize10/MinimumSize--
  | !--MinimumSize0/MinimumSize   --
  |   /container-pool-conf
  |   commit-optionA/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-namejdbc/OSnetDataSource/res-ref-name
  |   resource-nameOSnetDataSource/resource-name
  |   /resource-ref
  |   ejb-nameOSnet_OrganizationEJB/ejb-name
  |   jndi-nameOSnet/Organization/jndi-name
  |   configuration-nameCustom 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-nameStandard CMP 2.x EntityBean/container-name
  |  call-loggingfalse/call-logging
  |  
invoker-proxy-binding-nameentity-rmi-invoker/invoker-proxy-binding-name
  |  sync-on-commit-onlyfalse/sync-on-commit-only
  |  insert-after-ejb-post-createfalse/insert-after-ejb-post-create
  |  container-interceptors
  | 
interceptororg.jboss.ejb.plugins.ProxyFactoryFinderInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.LogInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.SecurityInterceptor/interceptor
  | interceptororg.jboss.ejb.plugins.TxInterceptorCMT/interceptor
  | interceptor 
metricsEnabled=trueorg.jboss.ejb.plugins.MetricsInterceptor/interceptor
  | 

[JBoss-user] [Persistence CMP/JBoss] - Re: Configuring JBoss CMP for a caching enviroment

2004-05-26 Thread erik777
JBoss caching is very configurable.  I CMP configuration samples on this computer, but 
I'm sure others can show you examples of how to configure CMP's caching.  

Virtually all database caching uses lazy loading, since you can't anticipate what 
the user will need to read ahead of time, and don't want to load the whole database in 
memory by default.

Principally, you can primarily tweak the timings and pool sizes.  With the former, 
you're anticipating usage patterns.  With the latter, you're weighing memory usage 
efficiency usage versus performance.  

JBoss comes out-of-the-box with default configuration for your CMP beans.  To 
override, you create your own configurations (can copy JBoss default, and then rename 
and modify.)  You can then apply your configuration to beans on an individual basis.  
You both define configurations and then associate them with individual beans in your 
jboss.xml.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3836359#3836359

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836359



---
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=3149alloc_id=8166op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Configuring JBoss CMP for a caching enviroment

2004-05-26 Thread ltcmelo
Erik,
your explanation is nice, thanks.

Would you have some pieces of this configuration information you said?

I don't mean the whole files, but just some parts of some specific files that i 
should make changes.

Thanks,
ltcmelo

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3836371#3836371

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836371



---
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=3149alloc_id=8166op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user