In our case 2 (or more) users are not trying to save same user object,they
are trying to save their own objects . 
This problem comes only when we test it through a tool.  

mraible wrote:
> 
> If 2 (or more) users try to save the same user record at the same  
> time, you will likely see this error. This is because the User object  
> uses versioning to prevent the last-update-wins problem.
> 
> Matt
> 
> On Jan 7, 2008, at 5:45 AM, ujjala wrote:
> 
>>
>> In normal scenario when a single user login ,in that case the log  
>> file shows
>> following output
>>
>>
>>
>> [1/6/08 14:02:19:797 PST] 6ecd213a SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 1] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> ao2
>> [1/6/08 14:02:19:844 PST] 6ecd213a SystemOut     O
>> LoginTimeAction.execute()------passwordstampnull2
>> [1/6/08 14:02:19:844 PST] 6ecd213a SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 1] UserAction.edit(149) | Entering 'edit'
>> method
>> [1/6/08 14:02:29:297 PST] 36a9e133 SystemOut     O  Adding SessionId
>> ->0BG-aKdATkH3gceTQwqu8sU  user Name :ao3
>> [1/6/08 14:02:29:453 PST] 36a9e133 SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 6] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> ao3
>> [1/6/08 14:02:29:562 PST] 36a9e133 SystemOut     O [appfuse2] WARN
>> [Servlet.Engine.Transports : 6] LoggerListener.onApplicationEvent 
>> (60) |
>> Authentication event AuthenticationSuccessEvent: ao3; details:
>> [EMAIL PROTECTED]:  
>> RemoteIpAddress:
>> 127.0.0.1; SessionId: 0BG-aKdATkH3gceTQwqu8sU
>>
>>
>>
>> ---------------
>>
>>
>>
>> But we are testing it through a tool rational robo in which 25 users
>> concurrently login .
>> in this case application hangs up and log file shows the following  
>> output.
>> In this case We are getting staleobjectstateexception for role .
>>
>>
>>
>>
>>
>> ===================
>> [1/4/08 15:40:26:266 IST] 5705a267 SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 6] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> aocbcl1
>> [1/4/08 15:40:26:812 IST] 5f37a267 SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 18] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> aocapo1
>> [1/4/08 15:40:27:469 IST] 51232267 SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 4] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> aocbcl2
>> [1/4/08 15:40:28:031 IST] 570da267 SystemOut     O [appfuse2] DEBUG
>> [Servlet.Engine.Transports : 8] UserDAOHibernate.saveUser(67) |  
>> user's id:
>> aoahar3
>> [1/4/08 15:40:28:688 IST] 5f3ba267 SystemOut     O [appfuse2] WARN
>> [Servlet.Engine.Transports : 19] LoggerListener.onApplicationEvent 
>> (60) |
>> Authentication
>>
>> event AuthenticationSuccessEvent: aoahar1; details:
>> [EMAIL PROTECTED]: RemoteIpAddress:
>> 10.13.7.47; SessionId:
>>
>> h-hHo-3L-E3piusva52THQ7
>> [1/4/08 15:40:28:703 IST] 5f3ba267 SystemOut     O [appfuse2] WARN
>> [Servlet.Engine.Transports : 19] LoggerListener.onApplicationEvent 
>> (60) |
>> Authentication
>>
>> event InteractiveAuthenticationSuccessEvent: aoahar1; details:
>> [EMAIL PROTECTED]: RemoteIpAddress:
>> 10.13.7.47; SessionId:
>>
>> h-hHo-3L-E3piusva52THQ7
>> [1/4/08 15:40:29:328 IST] 5413a267 SystemOut     O [appfuse2] ERROR
>> [Servlet.Engine.Transports : 9] AbstractFlushingEventListener.java 
>> (?) |
>> Could not
>>
>> synchronize database state with session
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect):
>>
>> [org.appfuse.model.Role#AO]
>>      at
>> org.hibernate.persister.entity.AbstractEntityPersister.check 
>> (AbstractEntityPersister.java:1635)
>>      at
>> org.hibernate.persister.entity.AbstractEntityPersister.update 
>> (AbstractEntityPersister.java:2208)
>>      at
>> org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert( 
>> AbstractEntityPersister.java:2118)
>>      at
>> org.hibernate.persister.entity.AbstractEntityPersister.update 
>> (AbstractEntityPersister.java(Compiled
>> Code))
>>      at
>> org.hibernate.action.EntityUpdateAction.execute 
>> (EntityUpdateAction.java:84)
>>      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java(Inlined
>> Compiled Code))
>>      at
>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java 
>> (Compiled
>> Code))
>>      at org.hibernate.engine.ActionQueue.executeActions 
>> (ActionQueue.java:141)
>>      at
>> org.hibernate.event.def.AbstractFlushingEventListener.performExecution 
>> s(AbstractFlushingEventListener.java(Inlined
>> Compiled Code))
>>      at
>> org.hibernate.event.def.DefaultFlushEventListener.onFlush 
>> (DefaultFlushEventListener.java(Inlined
>> Compiled Code))
>>      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java(Compiled  
>> Code))
>>      at
>> org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary( 
>> HibernateAccessor.java:394)
>>      at
>> org.springframework.orm.hibernate3.HibernateTemplate.execute 
>> (HibernateTemplate.java:366)
>>      at
>> org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate 
>> (HibernateTemplate.java:687)
>>      at
>> org.appfuse.dao.hibernate.UserDAOHibernate.saveUser 
>> (UserDAOHibernate.java:69)
>>      at
>> org.appfuse.dao.hibernate.UserDAOHibernate.getUser 
>> (UserDAOHibernate.java:48)
>>      at
>> org.appfuse.dao.hibernate.UserDAOHibernate.loadUserByUsername 
>> (UserDAOHibernate.java:88)
>>      at
>> org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser 
>> (DaoAuthenticationProvider.java:94)
>>      at
>> org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvi 
>> der.authenticate(AbstractUserDetailsAuthenticationProvider.java:126)
>>      at
>> org.acegisecurity.providers.ProviderManager.doAuthentication 
>> (ProviderManager.java:208)
>>      at
>> org.acegisecurity.AbstractAuthenticationManager.authenticate 
>> (AbstractAuthenticationManager.java:49)
>>      at
>> org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuth 
>> entication(AuthenticationProcessingFilter.java:90)
>>      at
>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter 
>> (AbstractProcessingFilter.java:228)
>>      at
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter 
>> (FilterChainProxy.java:303)
>>      at
>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter 
>> (HttpSessionContextIntegrationFilter.java:220)
>>      at
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter 
>> (FilterChainProxy.java:303)
>>      at
>> org.acegisecurity.util.FilterChainProxy.doFilter 
>> (FilterChainProxy.java:173)
>>      at
>> org.acegisecurity.util.FilterToBeanProxy.doFilter 
>> (FilterToBeanProxy.java:120)
>>      at
>> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter 
>> (FilterInstanceWrapper.java(Compiled
>> Code))
>>      at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 
>> (WebAppFilterChain.java(Compiled
>> Code))
>>      at
>> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDis 
>> patch(WebAppRequestDispatcher.java(Compiled
>> Code))
>>      at
>> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch 
>> (WebAppRequestDispatcher.java(Compiled
>> Code))
>>      at
>> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward 
>> (WebAppRequestDispatcher.java(Compiled
>> Code))
>>      at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward 
>> (WebAppInvoker.java:125)
>>      at
>> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook 
>> (WebAppInvoker.java:286)
>>      at
>> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvoca 
>> tion(CachedInvocation.java:71)
>>      at
>> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI 
>> (ServletRequestProcessor.java:182)
>>      at
>> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service 
>> (OSEListener.java:334)
>>      at
>> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest 
>> (HttpConnection.java:56)
>>      at
>> com.ibm.ws.http.HttpConnection.readAndHandleRequest 
>> (HttpConnection.java:615)
>>      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
>>      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled  
>> Code))
>> -- 
>> View this message in context: http://www.nabble.com/problem- 
>> regarding-concurrent-login-tp14664872s2369p14664872.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-regarding-concurrent-login-tp14664872s2369p14683016.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to