Alex,

When we use pessimistic, we get tons of deadlocks. More even than what we were seeing 
in 3.0.6. The situation it occurs most times is when a value object is being retrieved 
from an entity bean. The value object in most cases is pulled with some CMR's as well 
but it fails on value objects that do not include CMRs as well. 

This is our container configuration:

      <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>
         <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>

         <!-- Let's try optimistic locking - jcobb 7/3/2003 -->
         <!-- 
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy> 
-->
         <locking-policy>org.jboss.ejb.plugins.lock.JDBCOptimisticLock</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>
         <!-- Covalent CAM - Using commit-option A again - jcobb 7/3/2003 -->
         <commit-option>A</commit-option>
      </container-configuration>


Our jbosscmp-jdbc includes this:

   <optimistic-locking>
       <version-column/>
       <field-name>versionField</field-name>
       <column-name>ol_version</column-name>
       <jdbc-type>INTEGER</jdbc-type>
       <sql-type>INTEGER</sql-type>
    </optimistic-locking>


We're using a version strategy applied to all beans. From the looks of it, the counter 
is being updated even on operations which do not change the database, since after a 
couple of read operations in our app, I see the counter get incremented up to 7 times.

One thing which may have something to do with this is our use of xdoclet. We're using 
a version of 1.2 which was somewhere before b2 (we used a date tag). We've applied a 
few patches for value object related things, but the dd's its generating are being 
marked against jboss v.3.0. I am separately working on trying to figure out if we can 
make the move to 1.2b3. (Any suggestions in this department also welcomed :))

Thank you for your help,

-javier

> -----Original Message-----
> From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 6:36 AM
> To: Javier Soltero
> 
> Hello Javier,
> 
> - if you change locking policy to pessimistic (in 3.2.1) does
>   reentrance occur?
> - could you describe the situation when it occurs?
> - how do you configure optimistic locking?
> 
> Thanks,
> 
> alex
> 
> 
> Wednesday, July 09, 2003, 3:31:49 AM, Javier Soltero wrote:
> 
> JS> Hi,
> 
> JS> We're in the process of migrating an application from 3.0.6 to 3.2.1. Our
> main interest was to use Optimistic Locking for our many Entity Beans. We have
> the application running, using the version
> JS> strategy for OL, and during most calls to our backend (which is composed
> of session fa�ade beans and entity beans), we get errors such as the one below
> indicating that a reentrant method call was
> JS> detected. All the api's in our session beans have tx required, and we're
> using read-only method directives in the entity layer for every non-write
> method.
> 
> JS> Has anyone else seen problems like these? This does not occur with 3.0.6 +
> PessimisticLocking
> 
> 
> JS> Oh, and we're using commit-option A.
> 
> 
> JS> Any help will be greatly appreciated.
> 
> JS> Thanks,
> 
> JS> -javier
> 
> 
> 
> JS> 2003-07-08 15:36:02,881 ERROR [org.jboss.ejb.plugins.LogInterceptor]
> TransactionRolledbackLocalException, causedBy:
> JS> javax.ejb.EJBException: Reentrant method call detected: Platform [.10001.]
> JS>     at
> org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInter
> ceptor.java:73)
> JS>     at
> org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceIntercept
> or.java:174)
> JS>     at
> org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:
> 89)
> JS>     at
> org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationIntercept
> or.java:53)
> JS>     at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.j
> ava:84)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.ja
> va:273)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
> JS>     at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
> JS>     at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
> JS>     at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderI
> nterceptor.java:122)
> JS>     at
> org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
> JS>     at org.jboss.ejb.Container.invoke(Container.java:674)
> JS>     at
> org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory
> .java:353)
> JS>     at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
> JS>     at $Proxy355.getPlatformValue(Unknown Source)
> JS>     at
> net.covalent.spider.appdef.server.session.AgentManagerEJBImpl.getAgent(AgentMa
> nagerEJBImpl.java:379)
> JS>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> JS>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> JS>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
> ava:25)
> JS>     at java.lang.reflect.Method.invoke(Method.java:324)
> JS>     at
> org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessS
> essionContainer.java:629)
> JS>     at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cached
> ConnectionInterceptor.java:186)
> JS>     at
> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSess
> ionInstanceInterceptor.java:72)
> JS>     at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.j
> ava:84)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.ja
> va:243)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
> JS>     at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
> JS>     at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
> JS>     at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderI
> nterceptor.java:122)
> JS>     at
> org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContain
> er.java:322)
> JS>     at org.jboss.ejb.Container.invoke(Container.java:674)
> JS>     at
> org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory
> .java:353)
> JS>     at
> org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy
> .java:83)
> JS>     at $Proxy346.getAgent(Unknown Source)
> JS>     at
> net.covalent.spider.measurement.server.session.SessionEJB.getAgentConnection(S
> essionEJB.java:297)
> JS>     at
> net.covalent.spider.measurement.server.session.MeasurementProcessorEJBImpl.sch
> eduleRawMeasurements(MeasurementProcessorEJBImpl.java:309)
> JS>     at
> net.covalent.spider.measurement.server.session.MeasurementProcessorEJBImpl.sch
> edule(MeasurementProcessorEJBImpl.java:175)
> JS>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> JS>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> JS>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
> ava:25)
> JS>     at java.lang.reflect.Method.invoke(Method.java:324)
> JS>     at
> org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessS
> essionContainer.java:629)
> JS>     at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cached
> ConnectionInterceptor.java:186)
> JS>     at
> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSess
> ionInstanceInterceptor.java:72)
> JS>     at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.j
> ava:84)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.ja
> va:243)
> JS>     at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
> JS>     at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
> JS>     at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
> JS>     at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderI
> nterceptor.java:122)
> JS>     at
> org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContain
> er.java:322)
> JS>     at org.jboss.ejb.Container.invoke(Container.java:674)
> JS>     at
> org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory
> .java:353)
> JS>     at
> org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy
> .java:83)
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user




-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to