Re: synchronization problem

2016-04-09 Thread Yaragalla Muralidhar
thank you Doug Erickson. I will look into other areas and will check where the problem is. Thank you so much. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ * On Sun, Apr 10, 2016 at 11:02 AM, Doug Erickson wrote: > The code you've sho

Re: synchronization problem

2016-04-09 Thread Doug Erickson
The code you've shown won't allow simultaneous executions of the DAO method. Either you've left some important details out of the sample, or you have other code accessing the DAO. This has nothing to do with Struts. The synchronization is implemented in lower layers. > On Apr 9, 2016, at 8:11

Re: synchronization problem

2016-04-09 Thread Yaragalla Muralidhar
hi, if you look at my code in the service class i have written a synchronized block. what i am asking is, whether my code does the synchronization properly or does it have to be changed? I know that struts2 creates a new action class per thread. so there is every possibility that two threads can

Re: synchronization problem

2016-04-09 Thread Sreekanth S. Nair
Struts2 won't make your custom class threadsafe unless your code is threadsafe, synchronized(this) or synchronized method can be used in your service implementation if you think your service class is not threadsafe. Usually Service or DAO layer should be written threadsafe, don't know about your DA

synchronization problem

2016-04-09 Thread Yaragalla Muralidhar
Hi, I have developed a web application using struts 2. In my struts 2 action class i am calling the service layer and written the synchronization code as below in the service layer. Does this really gets synchronized? Is there any problem in my synchronization code? *The following is my ac