Good points Tom.
Do you do your optimistic lock check on
both ejbLoad and ejbStore?
I suggest using the following container
configuration with your optimistic locking scheme. If you try it out, let
me know how it works out.
Thanks,
Bill
<container-name>Standard CMP EntityBean</container-name>
<call-logging>false</call-logging>
<container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
<container-interceptors>
<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.EntityLockInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityMultiInstanceInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityMultiInstanceSynchronizationInterceptor</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.jaws.JAWSPersistenceManager</persistence-manager>
<transaction-manager>org.jboss.tm.TxManager</transaction-manager>
<locking-policy>org.jboss.ejb.plugins.lock.MethodOnlyEJBLock</locking-policy>
<container-invoker-conf>
<RMIObjectPort>4444</RMIObjectPort>
<Optimized>True</Optimized>
</container-invoker-conf>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000</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>
</container-pool-conf>
<commit-option>B</commit-option>
</container-configuration>
> -----Original Message-----
> From:
[EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
Behalf Of tom
> yeh
> Sent: Tuesday, April 09, 2002 8:58 PM
>
To: [EMAIL PROTECTED]
> Subject: Re: RE: [JBoss-dev]
RE: Bug in
> EntityMultiInstanceSynchronizationInterceptor.java
?
>
>
> >you can save a lot of loading time if you
>
>could check to see if the data stored in the
> >EntityContext is
still in sync with the db row.
>
> Dain, you already answered the
reason for Option B.
> However, when you said "very little we can reuse",
you seems to
> assume CMP. In our cases, we use Option B and BMP that
uses
> versioning for optimistic lock.
>
> Surprisedly, in the
current implementation of JBoss, our
> optimistic lock not only gets
nothing, but even hurts the
> performance (because an extra select must be
issued).
>
> Please re-think the priority to support Option
B.
>
>
_________________________________________________________
> View thread
online: http://main.jboss.org/thread.jsp?forum=66&thread=12462
>
>
_______________________________________________
> Jboss-development
mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development