Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

We should wrap delete/create/update in lock/unlock ?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the Data(access) class, we should wrap read/delete/create/update in lock/unlock ?

In the DB tier, I did not wrap read/create/update/delete in lock/unlock.
Just,in the booking method of GuiController class(GUI tier), I wraped the update in lock/unlock as follows,not Data (access) class.

The assignment does not require other funtions except booking.
So,I think that others(create/delete/read) do not need wrapping.
Of cource, If the assignment required me it, I would wrap others.

Am i right?


[ February 20, 2007: Message edited by: james bonds ]
 
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep I think that is a good approach and is very similar to how I have also done this. No need for create and delete in your gui so there is no need to wrap these. BTW - Create does not require a lock/unlock as the record does not exist before the method completes.

Mark.
 
reply
    Bookmark Topic Watch Topic
  • New Topic