• Post Reply Bookmark Topic Watch Topic
  • New Topic

synchronising service method

 
mukesh chandan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all..
i am new to servlet and jsp..
i want to know that why we synchronise service method while dealing with context attributes..

thanks all..
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mukesh chandan wrote:
i want to know that why we synchronise service method while dealing with context attributes..


Please never synchronise service method . there is only one context per application . so if you want, synchronize the context only
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and Welcome to Javaranch
 
mukesh chandan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
seetharaman..

i want to know why we synchronise context like getattributes() method..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!