locked
Plugin Thread Safety RRS feed

  • Question

  • Hi all,

    I have a plugin that executes some stored procedure on CRM database. Everything works fine but when multiple operations that trigger it, are made in the same time some of the operations remains blocked. As i know CRM engine instantiate only a single object of the plugin and use it multiple times. I don't have class members that remain unchanged between calls but i make an SqlConnection every time (is not static so is instantiated on every use). Maybe here is the problem.

    Is there anybody that faced the same problem? You have any idea how is the best practice for making sql calls inside plugins to be thread safety?

    Thanks!

    Tuesday, September 28, 2010 8:05 PM

Answers

  • while trying to execute the sp, you can create a thread(child) for that and let it run.

    just try in this way?

     

    Sudhanshu

    Wednesday, September 29, 2010 10:26 AM