Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3242924
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:22:20+00:00 2026-05-17T18:22:20+00:00

Our client follows SOA principles and have design web services that are very fine

  • 0

Our client follows SOA principles and have design web services that are very fine grained like createCustomer, deleteCustomer, etc.

I am not sure if fine grained services are desirable as they create transactional related issues. for e.g. if a business requirement is every Customer must have a Address when it’s created. So in this case, the presentation component will invoke createCustomer first and then createAddress. The services internally use simple JDBC to update the respective tables in db. As a service is invoked by external component, it has not way of fulfilling transactional requirement here i.e. if createAddress fails, createCustomer operation must be rolledback.

I guess, one of the approach to deal with this is to either design course grained services (that creates a Customer and associated Address in one single JDBC transaction) or
perhaps simple create a reversing service (deleteCustomer) that simply reverses the action of createCustomer.

any suggestions. thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:22:21+00:00Added an answer on May 17, 2026 at 6:22 pm

    The short answer: services should be designed for the convenience of the service client. If the client is told “call this, then cdon’t forget to call that” you’re making their lives too difficult. There should be a coarse-grained service.

    A long answer: Can a Customer reasonably be entered with no Address? So we call

    createCustomer( stuff but no address)
    

    and the result is a valid (if maybe not ideal) state for a customer. Later we call

    changeCustomerAddress ( customerId, Address)
    

    and now the persisted customer is more useful.

    In this scenario the API is just fine. The key point is that the system’s integrity does not depend upon the client code “remembering” to do something, in this case to add the address. However, more likely we don’t want a customer in the system without an address in which case I see it as the service’s responsibility to ensure that this happens, and to give the caller the fewest possibilities of getting it wrong.

    I would see a coarse-grained createCompleteCustomer() method as by far the best way to go – this allows the service provider to solve the problem once rather then require every client programmer to implement the logic.

    Alternatives:

    a). There are web Services specs for Atomic Transactions and major vendors do support these specs. In principle you could actually implement using fine-grained methods and true transactions. Practically, I think you enter a world of complexity when you go down this route.

    b). A stateful interface (work, work, commit) as mentioned by @mtreit. Generally speaking statefulness either adds complexity or obstructs scalability. Where does the service hold the intermediate state? If in memeory, then we require affinity to a particular service instance and hence introduce scaling and reliability problems. If in some State or Work-in-progress database then we have significant additional implementation complexity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At one of our client's site we have the following topology of BizTalk 2006
We have developed our website(Business users website) in .net Framework 2.0 Our client us
Our application runs off MySQL, but a client has another application that requires SQL.
Our client wants us to build a web-based, rich internet application for gathering software
Our client's site currently uses forms authentication, so users have to go to the
We are providing a snippit of HTML that our client can embed on their
We've built a javascript based widget that our client has embedded in their website.
We've got an application planned that is a very basic 7 page presetation. Our
I have a snippet to create a 'Like' button for our news site: <iframe
The problem we have are as follows: We are using ANT to build our

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.