Skip to Content
0
Former Member
Nov 06, 2014 at 10:26 AM

Thread creation in service layer

355 Views

Hi,

As part of business logic, I want to create a new thread and call a method inside that.When i execute ,it is throwing "No tenant active error". Any idea on how to create a thread inside a service class

 new Thread(new Runnable()
            {
                  public void run() 
                 { 
                      LOG.debug("Waiting for Replication to complete");
                      try 
                      {
                 Thread.sleep(30*1000);
                 disableFullIndexFlag();    
                     
              } 
                      catch (InterruptedException e) 
                      {
                         e.printStackTrace();
             }
                     
                 }
             }).start();