title: Web service method called once, but executed multiple times
body: <p>I'm developing a web service in Java EE 6, with only one method called E1CreateAccount.</p>
  
  <p>It happens that for each call I do to the method, the execution of the method fires multiple times (at least 2 times). The executions are consecutive, so the next start when the previous ends.</p>
  
  <p>The code of the method is the following:</p>
  
  <pre><code>@WebMethod
  public Object E1CreateAccount(@WebParam(name = "arg0") InboundAccountF56101IB newAccount) {
      Object ret = "KO";
      MyAction action = MyAction.CREATE;
      MyLogger.getLogger().info("Integration WebService called to Create new Account in E1, name " +
              newAccount.getCRMAccountName());
      E1AccountClientThread runner = new E1AccountClientThread();
      runner.initialize(newAccount, action);
      Thread thread = new Thread(runner);
      MyLogger.getLogger().info(thread.getId() + ": Created thread to " + action.name() +
              " Account. Account Name: " + newAccount.getCRMAccountName() + "...");
      try {
          MyLogger.getLogger().info(thread.getId() +
                  ": Starting thread to call E1 Account web service, Action: " +
                  action.name());
          thread.start();
          ret = "OK";
      } catch(Exception e) {
          String str = "Exception calling the thread delegate to call E1 Account web service (Action " +
                  action.name() + ". Message: " + e.getMessage().toString();
          MyLogger.getLogger().severe(str);
          ret="KO " + str;
      }
      return ret;
  }
  </code></pre>
  
  <p>It receive the call, it logs the fact that the service has been called, and then create a separated thread which will do the task. Then it always return the string "OK".</p>
  
  <p>The method works well, the only problem is the multiple execution, which is undesired for the software purposes.</p>
  
  <p>This is what I see from the logs:</p>
  
  <pre><code>Jul 06, 2015 3:17:57 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: Integration WebService called to Create new Account in E1, name THIS_IS_THE_COMPANY_NAME
  Jul 06, 2015 3:17:57 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: 1026: Created thread to CREATE Account. Account Name: THIS_IS_THE_COMPANY_NAME...
  Jul 06, 2015 3:17:57 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: 1026: Starting thread to call E1 Account web service, Action: CREATE
  [...]
  Jul 06, 2015 3:18:00 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: Integration WebService called to Create new Account in E1, name THIS_IS_THE_COMPANY_NAME
  Jul 06, 2015 3:18:00 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: 1027: Created thread to CREATE Account. Account Name: THIS_IS_THE_COMPANY_NAME...
  Jul 06, 2015 3:18:00 PM integration.services.e1.account.E1AccountService E1CreateAccount
  INFO: 1027: Starting thread to call E1 Account web service, Action: CREATE
  [...]
  </code></pre>
  
  <p>(I substituted with [...] the logs related to what the threads actually do because I think it is not relevant)</p>
  
  <p>The web service has been deployed on WebLogic 12.1.3, and I used the ide JDeveloper 12.1.3</p>