Tuesday 13 November 2012

DB Adapter Singleton behaviour in High Availability Environment

There was a problem which one can face in high availability environment (clustered) . 

We had one Integration between Oracle Ebiz and third party system in which we get data from Oracle Ebiz and send them to third party application. This integration was running fine till the time our server environment upgraded for high availability means clustered ones...
We had two clustered which were configured to be synchronous to idealised HA situation. But this causes one design issue in that Integration. 

The issue starts coming in our DB Adapter that now the DB Adapter starting polling Staging table(OEBS)  in parallel with the initialised interval. Cluster1 and Cluster2 starts initiating DB Adapter instances in parallel and if we increase the clusters form 2 to 3. The same way three instances of pooling components started. Which leads to a situation in which if we increase the clusters in future from 2 to 50 then in parallel 50 instances of pooling component will be created in parallel and will hit the third party application in parallel. This could be a problem for a target system if it doesn't supports parallel processing.

The solution to this problem was that we need a concept of singleton pattern in our pooling component / DB Adapter.

There's a property of Inbound endpoint lifecycle support within Adapters called Singleton.
To enable this feature for high availability environment for a given inbound adapter endpoint, one must add the singleton JCA service binding property in the composite.xml within the <binding.jca> element and set it to a value of true as shows.


Singleton Property in composite.xml

    <binding.jca config="bindin_file.jca">
        <property name="singleton">true</property>
    </binding.jca> 
 
This was our finding to the problem we faced in clustered environment.

I hope this helps others as well.

 
 

79 comments:

  1. How about in OSB ? We will not use the config file ryt ?

    ReplyDelete
    Replies
    1. Hi Raj,

      This can be achieved on Oracle Service Bus by editing the Configuration Details of the proxy service and set 'Topic Message Distribution' to 'One Copy Per Application'.

      I hope this helps....

      Delete
    2. "Topic Message Distribution" comes up only for JMS reads...what if we are using JCA DB adapter to poll files? The DB adapter is created in JDev and imported in OSB. Is there anything that can be done here?

      Delete
    3. Hi Mustafa,

      DB Adapter can't read the file. It is use to talk to datbase. FTP Adapters are used to poll files. When we create DB Adapter in Jdev and import them into the eclipse ( for OSB implementation ) we can add the same JCA properties.

      You're right 'Topic Message Distribution' setting in proxy is for JMS Adapters.

      Regards,
      Aysha

      Delete
    4. Thanks, my explanation of usage was a little terse, we are using JCA DB adapter for a sequential polling with file as helper. Anyway, that's not the real problem, the 'singleton' property is actually a SOA Composite property, how can we put this in the JCA imported in OSB?

      Delete
  2. Thanks for the Post. It was really helpful :)

    ReplyDelete
  3. Thanks Aysha, I will give this a go.. If I am not wrong this is something that can be done from the em console and does not require a redeployment.

    ReplyDelete
  4. Hi Nitin,

    I think this needs to be done into the code not from the em console. But if you find anything like this you can share your experience.

    Regards,
    Aysha

    ReplyDelete
  5. Hi Aysha,

    Ideally you would want to do this from the source in the composite.xml as you said however on an already deployed composite you can go the properties of the db adapter from the EM console and add a new property

    you will see 'singleton' in that list and we can set it to 'true'
    http://nitinaggarwal.wordpress.com

    ReplyDelete
  6. The above change would mean that you get the following entry into your composite.xml on the runtime.

    true

    ReplyDelete
  7. Yes you're right Nitin this can be updated in JCA settings from Em Console.

    But as you have already mentioned fresh deployment of the same component can overwrite this change.

    Regards,
    Aysha

    ReplyDelete
  8. Singelton property is added in the composite.xml in Bpel.
    Does anyone have idea, where exactly in OSB, this singleton property will be added for the proxy services which is polling Database.

    ReplyDelete
  9. @stalin richard you can check the distributed polling during DB adapter configuration for Polling.

    ReplyDelete
  10. I have another problem-my DBadapter is used in OSB business service and is doing merge and when the table is empty and creating two entries.How to make it singleton?

    ReplyDelete
  11. Hi Soumajita,

    Can you explain a bit more. I did not get the scenario clearly.

    Regards,
    Aysha

    ReplyDelete
  12. Sorry for replying late..some how I don't get any notification in my mailbox.!! Ayesha in my case the DB Adapter is used with OSB with merge and deployed in clustered environment.When the table was empty OSB- BS was creating two entries rather than only one insert. I do not find any alternatives..rather than manually inserting one dummy row. Then it is able to merge-update that row. Just wanted two know in case of insert/merge how to include the singleton property in OSB.? Any thoughts?

    ReplyDelete
  13. Use Procedure as workaround (or) follow this article - good idea - http://www.avioconsulting.com/blog/oracle-soa-database-adapter-polling-cluster-handy-logical-delete-pattern

    ReplyDelete
  14. In cluster environment with 2 managed servers then how it knows that one server should to work for poll the messages , in case server1 went down that time server 2 will poll the messages or it will wait for the server1 running state.

    ReplyDelete
  15. Hi.....
    The given content is useful for our company. We IT Hub Online Training providing Oracle SOA Online Training. For any more information visit our site...

    ReplyDelete
  16. Thanks for the nice topic. Very useful information.
    We IT hub Online Training are good in giving the oracle apps technical Training

    ReplyDelete
  17. This is really very happy for the great info is visible in this blog and thanks a lot for using the nice info is visible in this blog.Oracle Apps Technical Online Training

    ReplyDelete
  18. While configuring a DB adapter in a clustered environment we anyways select the "Distributed Polling" option.Then what's the real use Singleton property.Could you please assist by making it clear :-)

    ReplyDelete
    Replies
    1. Singleton is used to avoid a situation when adapter\bpel deployed on different nodes tries to read same records and duplication is not affordable in a business case.

      Delete
  19. Thank you for sharing this kind of useful information,
    It is very useful to me and like who are searching for Oracle SOA online training from USA, UK and India.

    ReplyDelete
  20. Thank you for posting this blog. Your blog is so interesting. If you are looking for best Oracle fusion financials Online coaching, Our on-line coaching supplier gained the high commonplace name through worldwide for its teaching.
    Oracle fusion financials training

    ReplyDelete
  21. Hi,
    You have performed a great job by posting article oracle SOA. I will definitely digg it and for my part recommend to my friends. I'm sure they will be benefited from this site.
    Thank you,
    Oracle Financials training

    ReplyDelete
  22. This article creates a new hope and inspiration with in me. Thanks for sharing article like this.
    The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.



    Oracle fusion Financials Training in hyderabad

    Oracle Fusion Financials online Training in hyderabad

    ReplyDelete
  23. It is very good and useful for students and developer . Learned a lot of new things from your post!Good creation ,thanks for good info Oracle SOA Online Training Hyderabad

    ReplyDelete
  24. I am really admired for the great info is visible in this blog that to lot of benefits for visiting the nice info in this website. Thanks a lot for using the nice info is visible in this blog.
    Java training in chennai | Data Science Training in Chennai | DevOps Training in Chennai

    ReplyDelete
  25. Thank you for giving the information and it is use full for me. training with placement in Hyderabad

    ReplyDelete
  26. Thank you for giving the information and it is use full for me. training with placement in Hyderabad

    ReplyDelete
  27. hanks for sharing the good information and post more information. Talent flames company is one of the best training and placement companies in Hyderabad. Providing training on Technologies like Java,Sql,Oracle,..,etc with 100% Placement Assistance. Now Interviews going on if you want to attend just visit our website and drop your resume. for more information visit us http://talentflames.com/
    training and placement company in Hyderabad

    ReplyDelete
  28. Nice Information
    Yaaron Studios is one of the rapidly growing editing studios in Hyderabad. We are the best Video Editing services in Hyderabad. We provides best graphic works like logo reveals, corporate presentation Etc. And also we gives the best Outdoor/Indoor shoots and Ad Making services.

    Best video editing services in Hyderabad,ameerpet
    Best Graphic Designing services in Hyderabad,ameerpet­
    Best Ad Making services in Hyderabad,ameerpet­

    ReplyDelete
  29. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.

    Data Science Certification Malaysia
    Big Data Analytics Malaysia
    Data Analytics Course Malaysia

    ReplyDelete
  30. Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work!big data analytics course malaysia
    data science course malaysia
    data analytics courses
    360DigiTMG

    ReplyDelete
  31. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    business analytics course

    data analytics courses in mumbai

    data science interview questions

    data science course in mumbai

    ReplyDelete
  32. Nice blog Post ! This post contains very informative and knowledgeable. Thanks for sharing the most valuable information
    Hadoop Training in Hyderabad

    ReplyDelete
  33. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
    data analytics course
    data science course
    iot course

    ReplyDelete
  34. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it!
    data science course in hyderabad with placements

    ReplyDelete
  35. I see some amazingly important and kept up to length of your strength searching for in your on the site
    data scientist course in hyderabad

    ReplyDelete
  36. This post is very simple to read and appreciate without leaving any details out. Great work!
    machine learning course in aurangabad

    ReplyDelete
  37. Thanks a lot. You have done an excellent job. I enjoyed your blog . Nice efforts
    data scientist training in hyderabad

    ReplyDelete
  38. Informative article. Thanks for sharing with us.keep it up.
    artificial intelligence training in chennai

    ReplyDelete
  39. This was an authentic and useful piece of information. Thank you for giving this useful content.
    Phases Of Hacking
    Steps Of Hacking

    ReplyDelete
  40. This post is very simple to read and appreciate without leaving any details out. Great work!
    data science training

    ReplyDelete
  41. Cool you write, the information is very good and interesting, I'll give you a link to my site. data science training in mysore

    ReplyDelete
  42. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post.
    cyber security training malaysia

    ReplyDelete
  43. Good to visit your weblog again, it has been months for me. Nicely this article that i've been waiting for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.
    data science course fee in hyderabad

    ReplyDelete
  44. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one.
    business analytics course in hyderabad

    ReplyDelete
  45. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing.data science course in rohtak

    ReplyDelete
  46. Wow, what an amazing post. Your information is really good, and I can use it. Provide more precise information. Visit the Java course in Ghaziabad if someone is interested in learning data science.

    ReplyDelete
  47. Thank you for this blog. It is very useful. Share more like this.
    Salesforce Training in Chennai
    salesforce course online

    ReplyDelete
  48. Excellent Post... Thanks for sharing.

    Vintage Finance offers instant short-term loans in order to make your life simple. We have innovative solutions to limit you from facing a money crunch. We ensure that our customers have sufficient funds to shop, socialize, travel and pay their bills on time with their instant loans.
    Private loan in Noida
    Personal loan providers in Delhi
    Personal loan for CIBIL defaulter

    ReplyDelete
  49. Very Nice post.
    Sarv Delhi, Premium Suppliers & Manufacturers of Wheel Alignment Machine, Wheel Balancing Machines, Tyre Changing machines , Lifts, Nitrogen, Vehicle Exhaust Extraction Systems & Tyre Service Tools since 31 Years.
    DPF Cleaning Machine
    Tubeless Tyre Repair Kit
    Automatic Tyre Inflator
    3D Wheel Alignment Machine
    Wheel Balancing Machine


    ReplyDelete
  50. AWS(Amazon Web Services) is the best Cloud Computing platform
    used in various organizations for their business development.
    The main aim of the organization is to grow and make a profit
    through various services using aws cloud computing platform.
    It allows the organization to store all its data in the cloud
    without any physical space. This cloud computing platform allows
    the organization to access data more easily from anywhere using the internet.
    AWS Training in Chennai
    AWS Online Training
    AWS Training in Bangalore

    ReplyDelete
  51. This comment has been removed by the author.

    ReplyDelete
  52. Thank you so much for using the wonderful information that is available on this blog; I'm really delighted about it.
    Top CEC colleges in Hyderabad

    ReplyDelete
  53. Your astute identification of the issue and its solution through the use of the Singleton pattern within the DB Adapter is commendable. This will undoubtedly benefit others in similar high-availability environments. Well done!
    Data Analytics Courses In Dubai

    ReplyDelete
  54. I'm very grateful that such wonderful information is available on this blog, and I appreciate your use of the informative material there.
    Best MEC Juniour Colleges in Hyderabad

    ReplyDelete
  55. Your clear and concise explanation helps demystify this design pattern and its significance in maintaining a single, shared database connection.
    Data Analytics Courses In Chennai

    ReplyDelete
  56. I'm really happy that you took advantage of the amazing material on this page, so thank you very much for doing so.
    Data Analytics Courses in Agra

    ReplyDelete
  57. I appreciate your interesting blog on the behavior of singletons in high-availability configurations for DB adapters. In these circumstances, it is essential to ensure data dependability.
    Visit - Data Analytics Courses in Delhi

    ReplyDelete
  58. nice blog
    Data Analytics Courses In Vadodara

    ReplyDelete
  59. It's a fantastic resource for anyone passionate about staying up-to-date with the latest in the tech world.

    Digital marketing courses in illinois

    ReplyDelete
  60. thanks for sharing such well written blog post, great work on the content
    Digital marketing business

    ReplyDelete
  61. Thanks so much for the pointer. I have been unable to solve this myself.

    Investment banking analyst jobs

    ReplyDelete
  62. The seamless flow of ideas and engaging writing style make it easy to stay immersed in the content.
    Digital marketing courses in city of Westminster

    ReplyDelete