title: Worklight: Performance of calling java static method vs object creation
body: <p>I need suggestions either I make custom java method as static OR accessing via java object from an Adapter?</p>
  
  <p>My scenario is: thousands of users are making transactions and each user is accessing the same method again &amp; again and just changing some values specific to that user or transaction. </p>
  
  <p>Now if I am making them as static methods then will it cause problems for users, as we know the adapter call is asynchronous....so if multiple users calling same method at the same time then will it cause problem is returning different values to each other?</p>
  
  <p>Or if i access all custom java methods via first declaring that class object and then accessing methods, providing parameters....so in this way when multiple users access the same method at the same time then they will get proper/relevant data?</p>
  
  <p>From performance point of view which approach is good and does static method approach bring wrong data to users.....one user's data to another, and others to another person.</p>
  
  <p>thanks
  Abdul Ahad</p>
  
  <p>------------ my code is like---</p>
  
  <pre><code>java code:
  
    public static String getBalanceSummaries(String userAct){
              String replyMsg="";
      try {
  
      replyMsg = getBalanceStatementfromMQ(userAct);
  
      }catch(Exception e) {}
  
      return replyMsg;
  
      }
  
    -----WL Adapter code:------
  
      function showAllBalace(userActNo){
          return{
              result: com.my.package.getBalanceSummaries(userActNo)
          };
      }
  </code></pre>