On Tue, 2003-07-29 at 14:57, Alexey Loubyansky wrote:
> ID> the code is from xpetstore (this is not the code which fails, but is
> ID> similar). As you can see it does nothing more than create a regular
> 
> Are you jeering? You offer to find a bug in a code that does not fail?

> Some threads are accessing the same set of beans in different order.
> Try to investigate it. If you are using commit option B or C, a quick
> solution could be to switch to Instance Per Transaction container
> configuration.

what does it matter if they access the beans in a different order? are
the beans locked even before starting an iteration on them? if they are
locked while iterating, aren't they released once i've stopped using
them?

thanx,
ittay
> 
> alex
> 
> Tuesday, July 29, 2003, 1:50:22 PM, Ittay Dror wrote:
> 
> ID> On Tue, 2003-07-29 at 10:53, Alexey Loubyansky wrote:
> >> Hello Ittay,
> >> 
> >> the deadlock, probably, occurs in value object creation. So, pay
> >> attention to it or post more details/code snippets.
> 
> ID> ok. sorry if i've sent too little information. here is a code snippet of
> ID> how a value object is created. it is created automatically by xdoclet,
> ID> the code is from xpetstore (this is not the code which fails, but is
> ID> similar). As you can see it does nothing more than create a regular
> ID> object and copy native properties (String, Integer etc.) from self to
> ID> it. if it has a property that is itself a bean, it calls its
> ID> getXXXValue() method and sets the result in the value object.
> 
> ID>   public xpetstore.domain.customer.model.CustomerValue
> ID> getCustomerValue(  )
> ID>     {
> ID>         CustomerValue = new
> ID> xpetstore.domain.customer.model.CustomerValue(  );
> ID>         try
> ID>         {
> ID>             CustomerValue.setUserId( getUserId(  ) );
> ID>             CustomerValue.setFirstname( getFirstname(  ) );
> ID>             CustomerValue.setLastname( getLastname(  ) );
> ID>             CustomerValue.setEmail( getEmail(  ) );
> ID>             CustomerValue.setTelephone( getTelephone(  ) );
> ID>             CustomerValue.setLanguage( getLanguage(  ) );
> ID>             CustomerValue.setStreet1( getStreet1(  ) );
> ID>             CustomerValue.setStreet2( getStreet2(  ) );
> ID>             CustomerValue.setCity( getCity(  ) );
> ID>             CustomerValue.setState( getState(  ) );
> ID>             CustomerValue.setZipcode( getZipcode(  ) );
> ID>             CustomerValue.setCountry( getCountry(  ) );
> ID>             CustomerValue.setCreditCardNumber( getCreditCardNumber(  )
> ID> );
> ID>             CustomerValue.setCreditCardType( getCreditCardType(  ) );
> ID>             CustomerValue.setCreditCardExpiryDate(
> ID> getCreditCardExpiryDate(  ) );
> ID>             if ( getAccount(  ) != null )
> ID>             {
> ID>                 CustomerValue.setAccountValue( getAccount( 
> ID> ).getAccountValue(  ) );
> ID>             }
> ID>         }
> ID>         catch ( Exception e )
> ID>         {
> ID>             throw new javax.ejb.EJBException( e );
> ID>         }
> 
> ID>         return CustomerValue;
> ID>     }
> 
> 
> >> 
> >> alex
> >> 
> >> Tuesday, July 29, 2003, 8:19:45 AM, Ittay Dror wrote:
> >> 
> >> ID> Hi,
> >> 
> >> ID> The message in the subject happens with the following scenario:
> >> ID> 1. A stateless session bean (with CMT) calls a finder of a CMP-CMT
> >> ID> entity bean.
> >> ID> 2. The session bean iterates over the collection, for each bean there,
> >> ID> it calls a method in the bean that creates a value object for the bean
> >> ID> and returns it (the method is generated by xdoclet).
> >> ID> 3. Another thread calls the same session bean method and is at stage 2
> >> ID> (the call to the session beans initiates from a Struts action object,
> >> ID> for two different browsers loading the same page).
> >> 
> >> ID> The exception occures in:
> >> ID>          * Message: null; CausedByException is: Application deadlock
> >> ID> detected: Two or more transactions contention.
> >> 
> >> ID>       at 
> >> org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:385)
> >> ID>       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> >> ID>       at 
> >> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
> >> ID>       at 
> >> org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
> >> ID>       at org.jboss.ejb.Container.invoke(Container.java:674)
> >> ID>       at 
> >> org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
> >> ID>       at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
> >> ID>       at $Proxy118.getValue(Unknown Source)
> >> 
> >> 
> >> ID> The session and entity bean both have 'required' in their transaction
> >> ID> type.
> >> 
> >> ID> Thank you for your help,
> >> ID> Ittay
> >> 
> >> 
> >> 
> >> ID> -------------------------------------------------------
> >> ID> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> >> ID> Data Reports, E-commerce, Portals, and Forums are available now.
> >> ID> Download today and enter to win an XBOX or Visual Studio .NET.
> >> ID> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> >> ID> _______________________________________________
> >> ID> JBoss-user mailing list
> >> ID> [EMAIL PROTECTED]
> >> ID> https://lists.sourceforge.net/lists/listinfo/jboss-user
> >> 
> >> 
> >> 
> >> -------------------------------------------------------
> >> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> >> Data Reports, E-commerce, Portals, and Forums are available now.
> >> Download today and enter to win an XBOX or Visual Studio .NET.
> >> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> >> _______________________________________________
> >> JBoss-user mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
=======================================
Ittay Dror ([EMAIL PROTECTED])
User Space, R&D
Qlusters Inc.
Tel: +972-3-6081956 Fax: +972-3-6081841



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to