0 Replies Latest reply: Aug 2, 2012 11:30 AM by user13129417 RSS

    Help! My application uses a Single Thread !

    user13129417
      Hi all !
      I have a web application which performs some long running tasks. This can be easily simulated with:

      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                System.out.println("Started Long Running Task!");
                try {
                     Thread.sleep(20000);
                } catch (InterruptedException e) {
                     e.printStackTrace();
                }
                System.out.println("Done");
      }

      In order to deal with Long Running Tasks, I have created a WorkManager with MinThreads 10 and MaxThreads 100
      Then I have assigned the Work Manager to the Web application usign weblogic.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
      <wl-dispatch-policy>WorkManager-0</wl-dispatch-policy>
      </weblogic-web-app>

      However it seems that the Web application uses a SINGLE Thread to reply to the Servlet. In other words issuing n parallel requests the output is:
      Started Long Running Task!
      [20 Seconds Pause]
      Started Long Running Task!
      [20 Seconds Pause]
      Started Long Running Task!
      [20 Seconds Pause]
      Started Long Running Task!
      [20 Seconds Pause]
      .......
      My settings are the default Weblogic 12c Server settings, I've just added Weblogic NIO performance libs to the Java's path.
      Is there any setting which allow just 1 Socket for my application ? Maybe it's because I'm using the "unlicensed" (free download) server version ?
      Thanks a lot
      Frank