title: Implementing Multithreading in Oracle Procedures
body: <p>I am working on Oracle 10gR2.</p>
  
  <p>And here is my problem - </p>
  
  <p>I have a procedure, lets call it <strong>*proc_parent*</strong> (inside a package) which is supposed to call another procedure, lets call it <strong>*user_creation*</strong>. I have to call <strong>*user_creation*</strong> inside a loop, which is reading some columns from a table - and these column values are passed as parameters to the <strong>*user_creation*</strong> procedure.</p>
  
  <p>The code is like this:</p>
  
  <pre><code>FOR i IN (SELECT    community_id,
                          password,
                          username 
                 FROM     customer 
                 WHERE    community_id IS NOT NULL 
                 AND      created_by = 'SRC_GLOB'
                )
       LOOP
          user_creation (i.community_id,i.password,i.username);
       END LOOP;
  
  COMMIT;
  </code></pre>
  
  <p>user_Creation procedure is invoking a web service for some business logic, and then based on the response updates a table. </p>
  
  <p>I need to find a way by which I can use multi-threading here, so that I can run multiple instances of this procedure to speed up things. I know I can use <strong>*DBMS_SCHEDULER*</strong> and probably <strong>*DBMS_ALERT*</strong> but I am not able to figure out, how to use them inside a loop.</p>
  
  <p>Can someone guide me in the right direction?</p>
  
  <p>Thanks,
  Ankur</p>