• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Business Delegate Methods

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why the business delegate methods are synchronized?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are they?
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Core J2EE Patterns - Business Delegate


The Business Delegate on encountering a business service failure, may implement automatic recovery features without exposing the problem to the client. If the recovery succeeds, the client need not know about the failure. If the recovery attempt does not succeed, then the Business Delegate needs to inform the client of the failure. Additionally, the business delegate methods may be synchronized, if necessary.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess you'd sychronize only if you were concerned about two threads competing for access of some shared resource. The design of your business delegate will tell you if it has any such sensitive resources, like a member variable holding information about the current call. Even so, it would often be better to synchronize smaller blocks of code on the resource than whole methods on the delegate. I'm using a vendor framework with proprietary business delegate thingies and there's nothing synchronized in them.
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic